Module org.glassfish.grizzly
Package 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
- Author:
- Alexey Stashok
-
Constructor Summary
ConstructorsConstructorDescriptionCompletionHandlerAdapter
(FutureImpl<A> future) CompletionHandlerAdapter
(FutureImpl<A> future, CompletionHandler<A> completionHandler) CompletionHandlerAdapter
(FutureImpl<A> future, CompletionHandler<A> completionHandler, GenericAdapter<B, A> adapter) -
Method Summary
Modifier and TypeMethodDescriptionprotected A
void
The operation was cancelled.void
The operation was completed.void
The operation was failed.void
The callback method may be called, when there is some progress in operation execution, but it is still not completed
-
Constructor Details
-
CompletionHandlerAdapter
-
CompletionHandlerAdapter
-
CompletionHandlerAdapter
public CompletionHandlerAdapter(FutureImpl<A> future, CompletionHandler<A> completionHandler, GenericAdapter<B, A> adapter)
-
-
Method Details
-
cancelled
public void cancelled()Description copied from interface:CompletionHandler
The operation was cancelled.- Specified by:
cancelled
in interfaceCompletionHandler<A>
-
failed
Description copied from interface:CompletionHandler
The operation was failed.- Specified by:
failed
in interfaceCompletionHandler<A>
- Parameters:
throwable
- error, which occurred during operation execution
-
completed
Description copied from interface:CompletionHandler
The operation was completed.- Specified by:
completed
in interfaceCompletionHandler<A>
- Parameters:
result
- the operation result Please note, for performance reasons the result object might be recycled after returning from the completed method. So it's not guaranteed that using of the result object is safe outside this method's scope.
-
updated
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 interfaceCompletionHandler<A>
- Parameters:
result
- the current result Please note, for performance reasons the result object might be recycled after returning from the updated method. So it's not guaranteed that using of the result object is safe outside this method's scope.
-
adapt
-