org.lightwolf
Class DelayedCallSignal
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.lightwolf.FlowSignal
org.lightwolf.DelayedCallSignal
- All Implemented Interfaces:
- Serializable, Callable<Object>
public abstract class DelayedCallSignal
- extends FlowSignal
- implements Callable<Object>
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from interface java.util.concurrent.Callable |
call |
DelayedCallSignal
public DelayedCallSignal(long delay,
TimeUnit unit)
defaultAction
public void defaultAction()
- Description copied from class:
FlowSignal
- The signal's default action. The behavior of this method varies and is
defined by the actual signal class. Usually this method registers the
flow somewhere, so it can be resumed
when a certain event happens. A well-behaved flow-controller should always call
this method while handling a signal.
NOTE TO IMPLEMENTORS: Document well what the implementation of your
method does, specially on the method's JavaDoc. You can call
FlowSignal.getFlow()
to obtain the flow that have sent the signal. Inside
this method, it is guaranteed that the flow will be in suspended state.
- Specified by:
defaultAction
in class FlowSignal
getDelay
public long getDelay()
getUnit
public TimeUnit getUnit()
setFuture
public <V> void setFuture(ScheduledFuture<V> future)
cancel
public void cancel()
schedule
public ScheduledFuture<?> schedule()
waitDone
public void waitDone()
throws InterruptedException
- Throws:
InterruptedException
notifyDone
protected final void notifyDone()