net.officefloor.plugin.socket.server.http.protocol
Class HttpConnectionHandler

java.lang.Object
  extended by net.officefloor.plugin.socket.server.http.protocol.HttpConnectionHandler
All Implemented Interfaces:
ConnectionHandler

public class HttpConnectionHandler
extends Object
implements ConnectionHandler

HTTP ConnectionHandler.

Author:
Daniel Sagenschneider

Constructor Summary
HttpConnectionHandler(HttpConversation conversation, HttpRequestParser parser, int maxTextPartLength, long connectionTimeout)
          Initiate.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpConnectionHandler

public HttpConnectionHandler(HttpConversation conversation,
                             HttpRequestParser parser,
                             int maxTextPartLength,
                             long connectionTimeout)
Initiate.

Parameters:
conversation - HttpConversation.
parser - HttpRequestParser.
maxTextPartLength - Maximum length of text part for HttpRequest.
connectionTimeout - Connection timeout in milliseconds.
Method Detail

handleRead

public void handleRead(ReadContext context)
                throws IOException
Description copied from interface: ConnectionHandler
Handles a read from the SocketChannel.

Specified by:
handleRead in interface ConnectionHandler
Parameters:
context - ReadContext.
Throws:
IOException - If fails to obtain data from the ReadContext.

handleWrite

public void handleWrite(WriteContext context)
Description copied from interface: ConnectionHandler
Handles a potential write to the SocketChannel.

Specified by:
handleWrite in interface ConnectionHandler
Parameters:
context - WriteContext.

handleIdleConnection

public void handleIdleConnection(IdleContext context)
Description copied from interface: ConnectionHandler
Handles a Connection being idled.

Specified by:
handleIdleConnection in interface ConnectionHandler
Parameters:
context - IdleContext.


Copyright © 2005-2011. All Rights Reserved.