rice
Class Continuation.NamedContinuation
java.lang.Object
rice.Continuation.NamedContinuation
- All Implemented Interfaces:
- Continuation
- Enclosing interface:
- Continuation<R,E extends java.lang.Exception>
public static class Continuation.NamedContinuation
- extends java.lang.Object
- implements Continuation
Continuation class which takes a provided string as it's name, and
returns that String when toString() is called.
Nested classes/interfaces inherited from interface rice.Continuation |
Continuation.ErrorContinuation<R,E extends java.lang.Exception>, Continuation.ExternalContinuation<R,E extends java.lang.Exception>, Continuation.ExternalContinuationRunnable<R,E extends java.lang.Exception>, Continuation.ExternalRunnable, Continuation.ListenerContinuation<R,E extends java.lang.Exception>, Continuation.MultiContinuation, Continuation.NamedContinuation, Continuation.SimpleContinuation, Continuation.StandardContinuation<R,E extends java.lang.Exception> |
Method Summary |
void |
receiveException(java.lang.Exception result)
Called when an exception occurred as a result of the
previous command. |
void |
receiveResult(java.lang.Object result)
Called when an the result is available. |
java.lang.String |
toString()
Returns the name of this continuation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
parent
protected Continuation parent
name
protected java.lang.String name
Continuation.NamedContinuation
public Continuation.NamedContinuation(java.lang.String name,
Continuation command)
- Builds a new NamedContinuation given the name and the wrapped
continuation
- Parameters:
name
- The namecommand
- The parent continuation
receiveResult
public void receiveResult(java.lang.Object result)
- Called when an the result is available. Simply passes the result
to the parent;
- Specified by:
receiveResult
in interface Continuation
- Parameters:
result
- The result
receiveException
public void receiveException(java.lang.Exception result)
- Called when an exception occurred as a result of the
previous command. Simply calls the parent continuation's
receiveException() method.
- Specified by:
receiveException
in interface Continuation
- Parameters:
result
- The exception which was caused.
toString
public java.lang.String toString()
- Returns the name of this continuation
- Overrides:
toString
in class java.lang.Object
- Returns:
- The name
Copyright © 2001-2005 - Rice Pastry.