com.sun.grizzly
Interface CallbackHandler<E>

All Superinterfaces:
Handler
All Known Subinterfaces:
SSLCallbackHandler<E>
All Known Implementing Classes:
CacheableConnectorHandler, SSLConnectorHandler

public interface CallbackHandler<E>
extends Handler

Callback handler for non blocking client operations.

Author:
Jeanfrancois Arcand

Method Summary
 void onConnect(IOEvent<E> ioEvent)
          This method is called when an non blocking OP_CONNECT is ready to get processed.
 void onRead(IOEvent<E> ioEvent)
          This method is called when an non blocking OP_READ is ready to get processed.
 void onWrite(IOEvent<E> ioEvent)
          This method is called when an non blocking OP_WRITE is ready to get processed.
 

Method Detail

onConnect

void onConnect(IOEvent<E> ioEvent)
This method is called when an non blocking OP_CONNECT is ready to get processed. This method must invoke ConnectorHandler.finishConnect() to complete the connection operations.

Parameters:
ioEvent - an object containing information about the current non blocking connection.

onRead

void onRead(IOEvent<E> ioEvent)
This method is called when an non blocking OP_READ is ready to get processed.

Parameters:
ioEvent - an object containing information about the current non blocking connection.

onWrite

void onWrite(IOEvent<E> ioEvent)
This method is called when an non blocking OP_WRITE is ready to get processed.

Parameters:
ioEvent - an object containing information about the current non blocking connection.


Copyright © 2010 SUN Microsystems. All Rights Reserved.