|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.Continuation.ExternalContinuationRunnable
This class is used when you want to run some task on the selector thread and wait for it to return its result in a Continuation. It is essentially a covnenience object which combines the functionality of a Runnable that can be invoked on the Selector with an ExternalContinuation that it will wait on. Override the run(Continuation) method then call invoke() to get the result or Exception from the operation. The current thread will block on invoke until the continuation returns a result or an exception.
Constructor Summary | |
Continuation.ExternalContinuationRunnable()
Constructor for ExternalContinuationRunnable. |
Method Summary | |
protected abstract void |
execute(Continuation c)
DESCRIBE THE METHOD |
java.lang.Object |
invoke(Environment env)
DESCRIBE THE METHOD |
java.lang.Object |
invoke(SelectorManager sm)
DESCRIBE THE METHOD |
void |
run()
Main processing method for the ExternalContinuationRunnable object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Continuation.ExternalContinuationRunnable()
Method Detail |
public void run()
run
in interface java.lang.Runnable
protected abstract void execute(Continuation c) throws java.lang.Exception
c
- DESCRIBE THE PARAMETER
java.lang.Exception
- DESCRIBE THE EXCEPTIONpublic java.lang.Object invoke(SelectorManager sm) throws java.lang.Exception
sm
- DESCRIBE THE PARAMETER
java.lang.Exception
- DESCRIBE THE EXCEPTIONpublic java.lang.Object invoke(Environment env) throws java.lang.Exception
env
- DESCRIBE THE PARAMETER
java.lang.Exception
- DESCRIBE THE EXCEPTION
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |