juju.reattore.server.http
Class HttpServerHandler

java.lang.Object
  |
  +--juju.reattore.server.http.HttpServerHandler
All Implemented Interfaces:
Handler, ServerSocketHandler

public class HttpServerHandler
extends java.lang.Object
implements ServerSocketHandler

Handler that accepts a new incoming HTTP connection and hands it off to a new HTTP handler.


Constructor Summary
HttpServerHandler(HttpMediator mediator)
          Creates a new handler that uses the given mediator for attaching.
 
Method Summary
 int getInterestOps()
          Returns the set of operations this handler is currently interested in.
 void handleNewClient(java.nio.channels.SocketChannel ch)
          Called when the reactor has accepted a new, incoming connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServerHandler

public HttpServerHandler(HttpMediator mediator)
Creates a new handler that uses the given mediator for attaching.

Parameters:
mediator - The mediator to use.
Method Detail

getInterestOps

public int getInterestOps()
Description copied from interface: Handler
Returns the set of operations this handler is currently interested in. See SelectorKey for more informration.

Specified by:
getInterestOps in interface Handler
Returns:
Bitvect of SelectorKey.OP_*
See Also:
Handler

handleNewClient

public void handleNewClient(java.nio.channels.SocketChannel ch)
                     throws java.io.IOException
Description copied from interface: ServerSocketHandler
Called when the reactor has accepted a new, incoming connection.

Specified by:
handleNewClient in interface ServerSocketHandler
Parameters:
ch - The accepted, connected socket
Throws:
java.io.IOException - On a fatal error that will cause this socket to be closed and disconnected.
See Also:
Handler


Copyright © 2002-2003 Michael Hope. All Rights Reserved.