Top Description Methods
org.glassfish.grizzly

public Interface CompletionHandler<E>

Known Direct Implementers
org.glassfish.grizzly.EmptyCompletionHandler, org.glassfish.grizzly.nio.transport.DefaultStreamWriter.CompletionHandlerAdapter, org.glassfish.grizzly.nio.transport.DefaultStreamWriter.ResetCounterCompletionHandler, org.glassfish.grizzly.streams.AbstractStreamWriter.DisposeBufferCompletionHandler, org.glassfish.grizzly.utils.CompletionHandlerAdapter
Type Parameters
<E>
the type of the result

Interface, which will be used by Grizzly to notify about asynchronous I/O operations status updates.
Author
Alexey Stashok

Method Summary

Modifier and TypeMethod and Description
public void
cancelled()

The operation was cancelled.

public void
completed(E
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.
result
)

The operation was completed.

public void
failed(Throwable
error, which occurred during operation execution
throwable
)

The operation was failed.

public void
updated(E
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.
result
)

The callback method may be called, when there is some progress in operation execution, but it is still not completed

Method Detail

cancelledback to summary
public void cancelled()

The operation was cancelled.

completedback to summary
public void completed(E result)

The operation was completed.

Parameters
result:E

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.

failedback to summary
public void failed(Throwable throwable)

The operation was failed.

Parameters
throwable:Throwable

error, which occurred during operation execution

updatedback to summary
public void updated(E result)

The callback method may be called, when there is some progress in operation execution, but it is still not completed

Parameters
result:E

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.