|
||||||||||
| 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.StatListener
This class implements a listener that can be used to accept connections from clients for the use of reporting in-progress statistics while a job is running.
| Field Summary |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
StatListener(SLAMDServer slamdServer)
Creates a new instance of this stat listener. |
|
| Method Summary | |
void |
connectionLost(StatClientConnection connection)
Indicates that the specified stat client has disconnected from the SLAMD server. |
boolean |
forceDisconnect(java.lang.String clientID)
Forcefully closes the connection to the specified client and removes all references to it from the SLAMD server. |
void |
forceDisconnectAll()
Forcefully disconnects all real-time stat clients from the SLAMD server and removes all references to them. |
StatClientConnection[] |
getConnectionList()
Retrieves an array of the connections currently established to this stat listener. |
int |
getKeepAliveInterval()
Retrieves the keepalive interval that should be used for new client connections. |
int |
getMaxResponseWaitTime()
Retrieves the maximum length of time in seconds that the SLAMD server will wait for a response to a request issued to a stat client. |
java.lang.String |
getSubscriberName()
Retrieves the name that the stat 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 stat listener. |
void |
refreshSubscriberConfiguration(java.lang.String parameterName)
Re-reads the configuration for the specified parameter if the parameter is applicable to the stat listener. |
boolean |
requestDisconnect(java.lang.String clientID)
Sends a message to the specified client indicating that it should disconnect from the SLAMD server. |
void |
requestDisconnectAll()
Sends a message to all clients indicating that they should disconnect from the SLAMD server. |
boolean |
requireAuthentication()
Indicates whether this listener is configured to require authentication. |
void |
run()
Creates the server socket that will be used to accept new connections, then listens for new connections until the SLAMD server is shut down. |
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 StatListener(SLAMDServer slamdServer)
slamdServer - The SLAMD server with which this stat listener will be
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 StatClientConnection[] getConnectionList()
public boolean requestDisconnect(java.lang.String clientID)
clientID - The client ID of the client to which the request is to be
sent.
true if a request was sent to the specified client,
or false if not.public void requestDisconnectAll()
public boolean forceDisconnect(java.lang.String clientID)
clientID - The client ID of the client to be disconnected.
true if the client was disconnected, or
false if not.public void forceDisconnectAll()
public void connectionLost(StatClientConnection connection)
connection - The connection to the stat client that has been lost.public int getKeepAliveInterval()
public int getMaxResponseWaitTime()
public boolean requireAuthentication()
true if this listener is configured to require
authentication, or false if not.public java.lang.String getSubscriberName()
getSubscriberName in interface ConfigSubscriberpublic ParameterList getSubscriberParameters()
getSubscriberParameters in interface ConfigSubscriber
public void refreshSubscriberConfiguration()
throws SLAMDServerException
refreshSubscriberConfiguration in interface ConfigSubscriberSLAMDServerException - If there is a problem reading or applying
the changes.
public void refreshSubscriberConfiguration(java.lang.String parameterName)
throws SLAMDServerException
refreshSubscriberConfiguration in interface ConfigSubscriberparameterName - The name of the parameter for which to reread the
configuration.
SLAMDServerException - If there is a problem reading or applying
the specified change.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||