org.lightwolf
Class SuspendSignal
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.lightwolf.FlowSignal
org.lightwolf.SuspendSignal
- All Implemented Interfaces:
- Serializable
public class SuspendSignal
- extends FlowSignal
A signal indicating that the flow was suspended. This signal is sent by
Flow.suspend(Object)
method.
- Author:
- Fernando Colombo
- See Also:
- Serialized Form
Constructor Summary |
SuspendSignal(Object argument)
Initializes the signal with the given argument. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
SuspendSignal
public SuspendSignal(Object argument)
- Initializes the signal with the given argument. The method
Flow.suspend(Object)
simply forwards its argument to this
constructor. While handling this signal, the
argument can be obtained using getResult()
.
- Parameters:
argument
- The argument to be associated with this signal.
getResult
public Object getResult()
- Returns the argument associated with this signal. Usually this is the
argument sent to
Flow.suspend(Object)
.
- Overrides:
getResult
in class FlowSignal
- See Also:
SuspendSignal(Object)
defaultAction
public void defaultAction()
- Does nothing. This method does not register anywhere the suspended flow
(that is, the flow that sent this signal). Usually a flow registers
itself for later resuming, before
the call to
Flow.suspend(Object)
, or before sending this signal.
- Specified by:
defaultAction
in class FlowSignal