public class CompletionHandlerAdapter<A,B> extends Object implements CompletionHandler<B>
| Constructor and Description |
|---|
CompletionHandlerAdapter(FutureImpl<A> future) |
CompletionHandlerAdapter(FutureImpl<A> future,
CompletionHandler<A> completionHandler) |
CompletionHandlerAdapter(FutureImpl<A> future,
CompletionHandler<A> completionHandler,
GenericAdapter<B,A> adapter) |
| Modifier and Type | Method and Description |
|---|---|
protected A |
adapt(B result) |
void |
cancelled()
The operation was cancelled.
|
void |
completed(B result)
The operation was completed.
|
void |
failed(Throwable throwable)
The operation was failed.
|
void |
updated(B result)
The callback method may be called, when there is some progress in
operation execution, but it is still not completed
|
public CompletionHandlerAdapter(FutureImpl<A> future)
public CompletionHandlerAdapter(FutureImpl<A> future, CompletionHandler<A> completionHandler)
public CompletionHandlerAdapter(FutureImpl<A> future, CompletionHandler<A> completionHandler, GenericAdapter<B,A> adapter)
public void cancelled()
CompletionHandlercancelled in interface CompletionHandler<B>public void failed(Throwable throwable)
CompletionHandlerfailed in interface CompletionHandler<B>throwable - error, which occurred during operation executionpublic void completed(B result)
CompletionHandlercompleted in interface CompletionHandler<B>result - the operation resultpublic void updated(B result)
CompletionHandlerupdated in interface CompletionHandler<B>result - the current resultCopyright © 2013 Oracle Corporation. All Rights Reserved.