All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.habanero.RequestHandler

java.lang.Object
   |
   +----ncsa.habanero.DeferredIO
           |
           +----ncsa.habanero.RequestHandler

public class RequestHandler
extends DeferredIO
implements Runnable
This is a helper class that allows the CentralArbitrator to listen to many inputs at once. It starts itself in a new thread to listen to a specific input.


Constructor Index

 o RequestHandler(MarshallInput, MarshallOutput, ServerListener)

Method Index

 o addListener(ServerListener)
 o handshake()
 o listen()
 o lostConnection()
 o removeListener(ServerListener)
 o run()
 o start()
 o toWho()

Constructors

 o RequestHandler
 public RequestHandler(MarshallInput in,
                       MarshallOutput out,
                       ServerListener l)
Parameters:
arb - the central arbitrator
input - the input stream
output - the output stream
Returns:
Construct this with the input and the CentralArbitrator I'm working for.

Methods

 o handshake
 protected synchronized boolean handshake()
 o start
 public void start()
Returns:
starts the thread
 o run
 public void run()
Returns:
what you want the thread to do
 o lostConnection
 protected void lostConnection()
 o listen
 public void listen()
Parameters:
input - the input stream
output - the output stream
Returns:
Once a connection has been made, listen for new ActionRequests. When we get one, unmarshall and arbitrate it.
 o toWho
 public SessionParticipant toWho()
 o addListener
 public void addListener(ServerListener l)
 o removeListener
 public void removeListener(ServerListener l)

All Packages  Class Hierarchy  This Package  Previous  Next  Index