juju.reattore.server.http
Class HttpMediator

java.lang.Object
  |
  +--juju.reattore.server.http.HttpMediator

public class HttpMediator
extends java.lang.Object

The mediator acts as a central point allowing the server and client handlers to avoid knowing about each other.


Constructor Summary
HttpMediator(CombinedReactor reactor, Interceptor intercept)
          Create a new mediator.
 
Method Summary
 void doAttach(java.nio.channels.SocketChannel ch, ClientSocketHandler handler)
          Called by the server handler to attach a new client handler to the shared reactor.
 Interceptor getInterceptor()
          Get the top level interceptor a client should serve against.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpMediator

public HttpMediator(CombinedReactor reactor,
                    Interceptor intercept)
Create a new mediator.

Parameters:
reactor - The reactor to pass on to any clients or servers.
intercept - The interceptor change to use.
Method Detail

getInterceptor

public Interceptor getInterceptor()
Get the top level interceptor a client should serve against.

Returns:
The top level interceptor.

doAttach

public void doAttach(java.nio.channels.SocketChannel ch,
                     ClientSocketHandler handler)
              throws java.io.IOException
Called by the server handler to attach a new client handler to the shared reactor.

Parameters:
ch - The new client socket
handler - The handler for this new socket
Throws:
java.io.IOException - on PENDING
See Also:
ClientSocketReactor.attach(java.nio.channels.SocketChannel, juju.reattore.core.reactor.ClientSocketHandler)


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