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.


Variable Index

 o hostname
 o listeners
 o session
 o stopped

Constructor Index

 o CommManager()
 o CommManager(Session)

Method Index

 o addCommunicator(String, Communicator)
 o freezeInput(Sharable)
 o getCommunicator(Sharable)
 o getCommunicator(String)
 o getHostName()
 o getObserverFactories()
 o getSession()
 o initSpecifiers()
 o isInitialized()
 o isStopped()
 o removeCommunicator(Collobject)
 o removeCommunicator(Communicator)
 o sendToClients(ServerMessage, Arbitrator)
 o sendToServer(Answerable)
 o setPort(Sharable, int)
 o setSession(Session)
 o stop()
 o thawInput(Sharable)

Variables

 o listeners
 protected transient Hashtable listeners
 o session
 protected Session session
 o stopped
 protected transient boolean stopped
 o hostname
 protected transient String hostname

Constructors

 o CommManager
 protected CommManager()
Returns:
creates a communication manager
 o CommManager
 protected CommManager(Session s)
Parameters:
s - the session that this communication manager is working for
Returns:
creates a communication manager

Methods

 o getHostName
 public String getHostName()
Returns:
the host name
 o 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
 o getObserverFactories
 public Hashtable getObserverFactories()
Returns:
the factory table
 o 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
 o 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
 o initSpecifiers
 public void initSpecifiers()
 o getSession
 public Session getSession()
Returns:
the communication manager's boss
 o setSession
 public void setSession(Session s)
Parameters:
s - the new session
Returns:
change the communication manager's boss
 o 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
 o sendToServer
 public void sendToServer(Answerable question)
Parameters:
question - what the client wants to know
Returns:
does nothing but complain
 o stop
 public void stop()
Returns:
stop communicating
 o isStopped
 public boolean isStopped()
Returns:
true if we have stopped communicating
 o isInitialized
 public boolean isInitialized()
Returns:
true if we have turned all specifiers back to Sharables
 o freezeInput
 public void freezeInput(Sharable toDump)
Returns:
does nothing at this level
 o thawInput
 public void thawInput(Sharable toDump)
Returns:
does nothing at this level
 o 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
 o getCommunicator
 public Communicator getCommunicator(String key)
 o 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