org.glassfish.grizzly.callbackhandler
Interface CallbackHandler

All Superinterfaces:
Processor
All Known Implementing Classes:
AbstractCallbackHandler, CallbackHandlerAdapter

public interface CallbackHandler
extends Processor

Callback handler, which works like adapter for Processor, where each IOEvent could be processed in separate method.

Author:
Jeanfrancois Arcand
See Also:
Processor, IOEvent

Method Summary
 void onAccept(Context context)
          This method is called when IOEvent.ACCEPTED event occured on Connection.
 void onClose(Context context)
          This method is called when IOEvent.CLOSED event occured on Connection.
 void onConnect(Context context)
          This method is called when IOEvent.CONNECTED event occured on Connection.
 void onRead(Context context)
          This method is called when IOEvent.READ event occured on Connection.
 void onWrite(Context context)
          This method is called when IOEvent.WRITE event occured on Connection.
 
Methods inherited from interface org.glassfish.grizzly.Processor
afterProcess, beforeProcess, context, isInterested, process, setInterested
 

Method Detail

onAccept

void onAccept(Context context)
              throws IOException
This method is called when IOEvent.ACCEPTED event occured on Connection.

Parameters:
context - an object containing information about the event processing.
Throws:
IOException

onConnect

void onConnect(Context context)
               throws IOException
This method is called when IOEvent.CONNECTED event occured on Connection.

Parameters:
context - an object containing information about the event processing.
Throws:
IOException

onRead

void onRead(Context context)
            throws IOException
This method is called when IOEvent.READ event occured on Connection.

Parameters:
context - an object containing information about the event processing.
Throws:
IOException

onWrite

void onWrite(Context context)
             throws IOException
This method is called when IOEvent.WRITE event occured on Connection.

Parameters:
context - an object containing information about the event processing.
Throws:
IOException

onClose

void onClose(Context context)
             throws IOException
This method is called when IOEvent.CLOSED event occured on Connection.

Parameters:
context - an object containing information about the event processing.
Throws:
IOException


Copyright © 2009 SUN Microsystems. All Rights Reserved.