|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
com.sun.slamd.server.ResourceMonitorClientListener
This class implements the client listener that the SLAMD server uses to listen for connections from resource monitor clients. If fewer than the maximum connections are established, then the connection will be accepted and a new connection thread will be spawned to handle operations on that monitor connection. If the maximum number of connections are already in use, then the new connection will be rejected.
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
ResourceMonitorClientListener(SLAMDServer slamdServer)
Creates a new listener to accept resource monitor client connections. |
|
| Method Summary | |
void |
connectionLost(ResourceMonitorClientConnection clientConnection)
Indicates that the specified connection is closing and all refrences to it should be removed. |
boolean |
connectionsAvailable(Job job)
Indicates whether all the resource monitor clients needed for the specified job are currently available. |
void |
forcefullyDisconnectAll()
Forcefully closes the connections for all resource monitor clients connected to the SLAMD server. |
int |
getKeepAliveInterval()
Retrieves the length of time that should pass between keepalive messages. |
int |
getMaxResponseWaitTime()
Retrieves the maximum amount of time in seconds that a client connection should wait for a response to a solicited message before returning an error. |
ResourceMonitorClientConnection[] |
getMonitorClientConnections(Job job)
Retrieves the set of resource monitor client connections for processing the specified job. |
ResourceMonitorClientConnection[] |
getMonitorClientList()
Retrieves a list of the resource monitor clients that are currently connected to the SLAMD server. |
java.lang.String |
getNewConnectionID()
Retrieves a connection ID that can be used to uniquely identify each client connection. |
java.lang.String |
getSubscriberName()
Retrieves the name that the client listener uses to subscribe to the configuration handler in order to be notified of configuration changes. |
ParameterList |
getSubscriberParameters()
Retrieves the set of configuration parameters associated with this configuration subscriber. |
void |
refreshSubscriberConfiguration()
Re-reads all configuration information used by the resource client listener. |
void |
refreshSubscriberConfiguration(java.lang.String parameterName)
Re-reads the configuration for the specified parameter if the parameter is applicable to the resource monitor client listener. |
void |
requestDisconnectAll()
Sends a message to each client indicating that it should disconnect itself from the SLAMD server. |
boolean |
requireAuthentication()
Indicates whether this client listener requries clients to authenticate. |
void |
run()
Creates the server socket and listens for new connections. |
void |
startListening()
Indicates that the listener should start listening for client connections. |
void |
stopListening()
Indicates that the listener should stop listening for client connections. |
void |
waitForStop()
This method will not return until the client listener has actually stopped. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ResourceMonitorClientListener(SLAMDServer slamdServer)
slamdServer - The SLAMD server with which this listener is
associated.| Method Detail |
public void startListening()
public void stopListening()
public void waitForStop()
stopListening method to signal the listener that it needs to
stop.
public void run()
run in interface java.lang.Runnablepublic ResourceMonitorClientConnection[] getMonitorClientConnections(Job job)
job - The job for which the connections are to be retrieved.
null if the requested set of monitor clients are not
available.public ResourceMonitorClientConnection[] getMonitorClientList()
public java.lang.String getNewConnectionID()
public boolean requireAuthentication()
true if clients are required to authenticate, or
false if they are not.public void requestDisconnectAll()
public void forcefullyDisconnectAll()
public void connectionLost(ResourceMonitorClientConnection clientConnection)
clientConnection - The connection that is shutting down.public boolean connectionsAvailable(Job job)
job - The job that specifies which monitor clients are needed.
true if all requested monitor clients are available,
or false if not.public int getKeepAliveInterval()
public int getMaxResponseWaitTime()
public java.lang.String getSubscriberName()
getSubscriberName in interface ConfigSubscriberpublic ParameterList getSubscriberParameters()
getSubscriberParameters in interface ConfigSubscriberpublic void refreshSubscriberConfiguration()
refreshSubscriberConfiguration in interface ConfigSubscriberpublic void refreshSubscriberConfiguration(java.lang.String parameterName)
refreshSubscriberConfiguration in interface ConfigSubscriberparameterName - The name of the parameter for which to reread the
configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||