ostore.dispatch
Interface Classifier.TimerCB

All Known Implementing Classes:
Classifier.DefaultTimerCB
Enclosing interface:
Classifier

public static interface Classifier.TimerCB

A Simple callback interface for timers.


Method Summary
 void cancel(Object token)
          Cancels an event previously scheduled.
 Object schedule(long millis, QueueElementIF event)
          dispatches a specified event some time in the future.
 

Method Detail

schedule

public Object schedule(long millis,
                       QueueElementIF event)
dispatches a specified event some time in the future.

Parameters:
millis - The number of milliseconds from now to dispatch the event.
event - The QueueElementIF to dispatch.
Returns:
a token to pass to cancel in order to cancel the event before it is dispatched.
See Also:
cancel(java.lang.Object)

cancel

public void cancel(Object token)
Cancels an event previously scheduled. If the event has already been dispatched, this method has no effect.

Parameters:
token - The Object returned by schedule.
Throws:
IllegalArgumentException - if token is not a token returned by the internal timer.
See Also:
schedule(long, seda.sandStorm.api.QueueElementIF)