rice
Class Continuation.NamedContinuation
java.lang.Object
rice.Continuation.NamedContinuation
-
All Implemented Interfaces:
- Continuation
- Enclosing interface:
- Continuation
-
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.
Method Summary |
void |
receiveException(java.lang.Exception result)
Called when an execption occured as a result of the
previous command. |
void |
receiveResult(java.lang.Object result)
Called when an the result is availble. |
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 name-
command
- The parent continuation
receiveResult
public void receiveResult(java.lang.Object result)
- Called when an the result is availble. 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 execption occured 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.