org.szegedi.nioserver.protocols.http
Class HttpProtocolHandlerFactory

java.lang.Object
  |
  +--org.szegedi.nioserver.protocols.http.HttpProtocolHandlerFactory
All Implemented Interfaces:
ProtocolHandlerFactory

public class HttpProtocolHandlerFactory
extends java.lang.Object
implements ProtocolHandlerFactory


Constructor Summary
HttpProtocolHandlerFactory(ByteBufferPool bufferPool, Adapter adapter)
           
 
Method Summary
 ProtocolHandler createProtocolHandler(java.nio.channels.SocketChannel channel)
          Called whenever a connection is accepted on a server socket for which this factory was registered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpProtocolHandlerFactory

public HttpProtocolHandlerFactory(ByteBufferPool bufferPool,
                                  Adapter adapter)
Method Detail

createProtocolHandler

public ProtocolHandler createProtocolHandler(java.nio.channels.SocketChannel channel)
Description copied from interface: ProtocolHandlerFactory
Called whenever a connection is accepted on a server socket for which this factory was registered.

Specified by:
createProtocolHandler in interface ProtocolHandlerFactory
Parameters:
channel - the server socket channel that represents the server-side of the connection.
Returns:
a protocol handler instance (either new or pooled) that will service the read and write operations on the socket. Returning null will cause the server to refuse the connection.