- Type Parameters:
E
- the type of the result
- All Known Implementing Classes:
AbstractStreamWriter.DisposeBufferCompletionHandler
,CompletionHandlerAdapter
,EmptyCompletionHandler
,SSLStreamWriter.HandshakeCompletionHandler
,TCPNIOServerConnection.RegisterAcceptedChannelCompletionHandler
,TransformerInput.TransformerCompletionHandler
,UDPNIOTransport.RegisterChannelCompletionHandler
public interface CompletionHandler<E>
Interface, which will be used by Grizzly to notify about asynchronous I/O operations status updates.
- Author:
- Alexey Stashok
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-
Method Details
-
cancelled
void cancelled()The operation was cancelled. -
failed
The operation was failed.- Parameters:
throwable
- error, which occurred during operation execution
-
completed
The operation was completed.- 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
The callback method may be called, when there is some progress in operation execution, but it is still not completed- 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.
-