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()
CompletionHandler
cancelled
in interface CompletionHandler<B>
public void failed(Throwable throwable)
CompletionHandler
failed
in interface CompletionHandler<B>
throwable
- error, which occurred during operation executionpublic void completed(B result)
CompletionHandler
completed
in interface CompletionHandler<B>
result
- the operation resultpublic void updated(B result)
CompletionHandler
updated
in interface CompletionHandler<B>
result
- the current resultCopyright © 2014 Oracle Corporation. All rights reserved.