Class EventScheduler
java.lang.Object
com.realtime.crossfire.jxclient.items.EventScheduler
A scheduler for asynchronous event notifications. Notifications are triggered
by calling
trigger(). Notifications are delivered by calling the
event scheduler callback of eventSchedulerCallback. This callback is
called delay after the last call to trigger() but not
faster than once per eventSchedulerCallback.-
Constructor Summary
ConstructorsConstructorDescriptionEventScheduler(int delay, int afterEventDelay, @NotNull Runnable eventSchedulerCallback) Creates a new instance. -
Method Summary
-
Constructor Details
-
EventScheduler
public EventScheduler(int delay, int afterEventDelay, @NotNull @NotNull Runnable eventSchedulerCallback) Creates a new instance.- Parameters:
delay- the initial delayafterEventDelay- the "after-event" delayeventSchedulerCallback- the callback to notify
-
-
Method Details
-
start
public void start()Activates this instance. -
trigger
public void trigger()Notifies the callback.
-