org.glassfish.grizzly.utils
Class CompletionHandlerAdapter<A,B>
java.lang.Object
org.glassfish.grizzly.utils.CompletionHandlerAdapter<A,B>
- All Implemented Interfaces:
- CompletionHandler<B>
- Direct Known Subclasses:
- SSLStreamWriter.HandshakeCompletionHandler
public class CompletionHandlerAdapter<A,B>
- extends java.lang.Object
- implements CompletionHandler<B>
- Author:
- Alexey Stashok
|
Method Summary |
protected A |
adapt(B result)
|
void |
cancelled()
The operation was cancelled. |
void |
completed(B result)
The operation was completed. |
void |
failed(java.lang.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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompletionHandlerAdapter
public CompletionHandlerAdapter(FutureImpl<A> future)
CompletionHandlerAdapter
public CompletionHandlerAdapter(FutureImpl<A> future,
CompletionHandler<A> completionHandler)
CompletionHandlerAdapter
public CompletionHandlerAdapter(FutureImpl<A> future,
CompletionHandler<A> completionHandler,
CompletionHandlerAdapter.ResultAdapter<A,B> adapter)
cancelled
public void cancelled()
- Description copied from interface:
CompletionHandler
- The operation was cancelled.
- Specified by:
cancelled in interface CompletionHandler<B>
failed
public void failed(java.lang.Throwable throwable)
- Description copied from interface:
CompletionHandler
- The operation was failed.
- Specified by:
failed in interface CompletionHandler<B>
- Parameters:
throwable - error, which occurred during operation execution
completed
public void completed(B result)
- Description copied from interface:
CompletionHandler
- The operation was completed.
- Specified by:
completed in interface CompletionHandler<B>
- Parameters:
result - the operation result
updated
public void updated(B result)
- Description copied from interface:
CompletionHandler
- The callback method may be called, when there is some progress in
operation execution, but it is still not completed
- Specified by:
updated in interface CompletionHandler<B>
- Parameters:
result - the current result
adapt
protected A adapt(B result)
Copyright © 2011 Oracle Corpration. All Rights Reserved.