com.koushikdutta.async.future
Class Continuation
java.lang.Object
com.koushikdutta.async.future.SimpleCancellable
com.koushikdutta.async.future.Continuation
- All Implemented Interfaces:
- ContinuationCallback, Cancellable, DependentCancellable, java.lang.Runnable
public class Continuation
- extends SimpleCancellable
- implements ContinuationCallback, java.lang.Runnable, Cancellable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Continuation
public Continuation()
Continuation
public Continuation(CompletedCallback callback)
Continuation
public Continuation(CompletedCallback callback,
java.lang.Runnable cancelCallback)
getCallback
public CompletedCallback getCallback()
setCallback
public void setCallback(CompletedCallback callback)
getCancelCallback
public java.lang.Runnable getCancelCallback()
setCancelCallback
public void setCancelCallback(java.lang.Runnable cancelCallback)
setCancelCallback
public void setCancelCallback(Cancellable cancel)
add
public Continuation add(ContinuationCallback callback)
insert
public Continuation insert(ContinuationCallback callback)
add
public void add(DependentFuture future)
cancel
public boolean cancel()
- Description copied from interface:
Cancellable
- Attempt to cancel this asynchronous operation.
- Specified by:
cancel in interface Cancellable- Overrides:
cancel in class SimpleCancellable
- Returns:
- The return value is whether the operation cancelled successfully.
start
public Continuation start()
onContinue
public void onContinue(Continuation continuation,
CompletedCallback next)
throws java.lang.Exception
- Specified by:
onContinue in interface ContinuationCallback
- Throws:
java.lang.Exception
run
public void run()
- Specified by:
run in interface java.lang.Runnable