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.
-
RequestHandler(MarshallInput, MarshallOutput, ServerListener)
-
-
addListener(ServerListener)
-
-
handshake()
-
-
listen()
-
-
lostConnection()
-
-
removeListener(ServerListener)
-
-
run()
-
-
start()
-
-
toWho()
-
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.
handshake
protected synchronized boolean handshake()
start
public void start()
- Returns:
- starts the thread
run
public void run()
- Returns:
- what you want the thread to do
lostConnection
protected void lostConnection()
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.
toWho
public SessionParticipant toWho()
addListener
public void addListener(ServerListener l)
removeListener
public void removeListener(ServerListener l)
All Packages Class Hierarchy This Package Previous Next Index