net.officefloor.plugin.socket.server
Interface ConnectionHandler

All Known Implementing Classes:
HttpConnectionHandler, SslConnectionHandler, TcpConnectionHandler

public interface ConnectionHandler

Handler for a Connection.

Required to be implemented by the handler provider.

Author:
Daniel Sagenschneider

Method Summary
 void handleIdleConnection(IdleContext context)
          Handles a Connection being idled.
 void handleRead(ReadContext context)
          Handles a read from the SocketChannel.
 void handleWrite(WriteContext context)
          Handles a potential write to the SocketChannel.
 

Method Detail

handleRead

void handleRead(ReadContext context)
                throws IOException
Handles a read from the SocketChannel.

Parameters:
context - ReadContext.
Throws:
IOException - If fails to obtain data from the ReadContext.

handleWrite

void handleWrite(WriteContext context)
                 throws IOException
Handles a potential write to the SocketChannel.

Parameters:
context - WriteContext.
Throws:
IOException - If fails to handle write.

handleIdleConnection

void handleIdleConnection(IdleContext context)
                          throws IOException
Handles a Connection being idled.

Parameters:
context - IdleContext.
Throws:
IOException - If fails to handle idle Connection. Possibly from attempting to close it.


Copyright © 2005-2011. All Rights Reserved.