rice
Class Continuation.NamedContinuation
java.lang.Object
rice.Continuation.NamedContinuation
- All Implemented Interfaces:
- Continuation
- Enclosing interface:
- Continuation<R,E extends Exception>
public static class Continuation.NamedContinuation
- extends 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 Exception>, Continuation.ExternalContinuation<R,E extends Exception>, Continuation.ExternalContinuationRunnable<R,E extends Exception>, Continuation.ExternalRunnable, Continuation.ListenerContinuation<R,E extends Exception>, Continuation.MultiContinuation, Continuation.NamedContinuation, Continuation.SimpleContinuation, Continuation.StandardContinuation<R,E extends Exception> |
parent
protected Continuation parent
name
protected String name
Continuation.NamedContinuation
public Continuation.NamedContinuation(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(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(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 String toString()
- Returns the name of this continuation
- Overrides:
toString in class Object
- Returns:
- The name
Copyright © 2010. All Rights Reserved.