All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.habanero.CommManager
java.lang.Object
|
+----ncsa.habanero.CommManager
- public abstract class CommManager
- extends Object
- implements Marshallable
This is the server-side portion of our centralized Arbitrator. It
listens for connections from client-side Arbitrators, and once it
gets them waits for ActionRequests. Upon receiving an ActionRequest,
it decides if it is valid, and if so creates an ActionGranted which
it passes to its Router.
-
hostname
-
-
listeners
-
-
session
-
-
stopped
-
-
CommManager()
-
-
CommManager(Session)
-
-
addCommunicator(String, Communicator)
-
-
freezeInput(Sharable)
-
-
getCommunicator(Sharable)
-
-
getCommunicator(String)
-
-
getHostName()
-
-
getObserverFactories()
-
-
getSession()
-
-
initSpecifiers()
-
-
isInitialized()
-
-
isStopped()
-
-
removeCommunicator(Collobject)
-
-
removeCommunicator(Communicator)
-
-
sendToClients(ServerMessage, Arbitrator)
-
-
sendToServer(Answerable)
-
-
setPort(Sharable, int)
-
-
setSession(Session)
-
-
stop()
-
-
thawInput(Sharable)
-
listeners
protected transient Hashtable listeners
session
protected Session session
stopped
protected transient boolean stopped
hostname
protected transient String hostname
CommManager
protected CommManager()
- Returns:
- creates a communication manager
CommManager
protected CommManager(Session s)
- Parameters:
- s - the session that this communication manager is working for
- Returns:
- creates a communication manager
getHostName
public String getHostName()
- Returns:
- the host name
addCommunicator
protected void addCommunicator(String key,
Communicator c)
- Parameters:
- key - the collobject
- c - the communicator
- Returns:
- adds the communicator c to the list of objects that it stores
getObserverFactories
public Hashtable getObserverFactories()
- Returns:
- the factory table
removeCommunicator
public void removeCommunicator(Communicator c)
- Parameters:
- c - the communicator that isn't being used any more
- Returns:
- removes the communicator c from the list of managed communicators
removeCommunicator
public void removeCommunicator(Collobject co)
- Parameters:
- co - the collobject
- Returns:
- removes the communicator c corresponding to the collobject co
from the list of managed communicators, only if it has its own stream
initSpecifiers
public void initSpecifiers()
getSession
public Session getSession()
- Returns:
- the communication manager's boss
setSession
public void setSession(Session s)
- Parameters:
- s - the new session
- Returns:
- change the communication manager's boss
sendToClients
public void sendToClients(ServerMessage message,
Arbitrator from)
- Parameters:
- message - the message that is being sent to the clients
- from - the arbitrator that is sending the message
- Returns:
- does nothing but complain
sendToServer
public void sendToServer(Answerable question)
- Parameters:
- question - what the client wants to know
- Returns:
- does nothing but complain
stop
public void stop()
- Returns:
- stop communicating
isStopped
public boolean isStopped()
- Returns:
- true if we have stopped communicating
isInitialized
public boolean isInitialized()
- Returns:
- true if we have turned all specifiers back to Sharables
freezeInput
public void freezeInput(Sharable toDump)
- Returns:
- does nothing at this level
thawInput
public void thawInput(Sharable toDump)
- Returns:
- does nothing at this level
setPort
public void setPort(Sharable s,
int port)
- Parameters:
- s - the sharable object that has a connection
- port - the port number
- Returns:
- sets the port - in general, this is a bad thing to do, but it
is required for a replay
getCommunicator
public Communicator getCommunicator(String key)
getCommunicator
protected Communicator getCommunicator(Sharable s)
- Parameters:
- s - the sharable object
- Returns:
- returns the communicator associated with this
All Packages Class Hierarchy This Package Previous Next Index