Class SuspendSignal

  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.lightwolf.FlowSignal
                  extended by org.lightwolf.SuspendSignal
All Implemented Interfaces:

public class SuspendSignal
extends FlowSignal

A signal indicating that the flow was suspended. This signal is sent by Flow.suspend(Object) method.

Fernando Colombo
See Also:
Serialized Form

Constructor Summary
SuspendSignal(Object argument)
          Initializes the signal with the given argument.
Method Summary
 void defaultAction()
          Does nothing.
 Object getResult()
          Returns the argument associated with this signal.
Methods inherited from class org.lightwolf.FlowSignal
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


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().

argument - The argument to be associated with this signal.
Method Detail


public Object getResult()
Returns the argument associated with this signal. Usually this is the argument sent to Flow.suspend(Object).

getResult in class FlowSignal
See Also:


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