org.glassfish.grizzly
Class CompletionHandlerAdapter<E>

java.lang.Object
  extended by org.glassfish.grizzly.CompletionHandlerAdapter<E>
All Implemented Interfaces:
CompletionHandler<E>
Direct Known Subclasses:
TCPNIOServerConnection.RegisterAcceptedChannelCompletionHandler, TCPNIOTransport.RegisterChannelCompletionHandler, UDPNIOTransport.RegisterChannelCompletionHandler

public class CompletionHandlerAdapter<E>
extends Object
implements CompletionHandler<E>

Adapter for CompletionHandler interface, which has empty implementation for all callback methods.

Author:
Alexey Stashok

Constructor Summary
CompletionHandlerAdapter()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompletionHandlerAdapter

public CompletionHandlerAdapter()
Method Detail

cancelled

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

Specified by:
cancelled in interface CompletionHandler<E>

failed

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

Specified by:
failed in interface CompletionHandler<E>
throwable - error, which occurred during I/O operation execution

completed

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

Specified by:
completed in interface CompletionHandler<E>
result - the I/O operation result

updated

public 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

Specified by:
updated in interface CompletionHandler<E>
result - the current result


Copyright © 2009 SUN Microsystems. All Rights Reserved.