org.glassfish.grizzly
Interface CompletionHandler<E>

All Known Implementing Classes:
AbstractStreamWriter.DisposeBufferCompletionHandler, CompletionHandlerAdapter, StreamReaderDecorator.FeederCompletionHandler, TCPNIOServerConnection.RegisterAcceptedChannelCompletionHandler, TCPNIOTransport.RegisterChannelCompletionHandler, 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
 void cancelled(Connection connection)
          The I/O operation on the Connection was cancelled.
 void completed(Connection connection, E result)
          The I/O operation on the Connection was completed.
 void failed(Connection connection, Throwable throwable)
          The I/O operation on the Connection was failed.
 void updated(Connection connection, E result)
          The callback method may be called, when there is some progress in I/O operation execution, but it is still not completed
 

Method Detail

cancelled

void cancelled(Connection connection)
The I/O operation on the Connection was cancelled.

Parameters:
context -

failed

void failed(Connection connection,
            Throwable throwable)
The I/O operation on the Connection was failed.

Parameters:
context -
throwable - error, which occurred during I/O operation execution

completed

void completed(Connection connection,
               E result)
The I/O operation on the Connection was completed.

Parameters:
context -
result - the I/O operation result

updated

void updated(Connection connection,
             E result)
The callback method may be called, when there is some progress in I/O operation execution, but it is still not completed

Parameters:
context -
result - the current result


Copyright © 2009 SUN Microsystems. All Rights Reserved.