|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.slamd.clientmanager.ClientManager
public class ClientManager
This class defines a client manager that will manage the process of starting clients independent of the SLAMD server itself.
| Field Summary | |
|---|---|
static int |
MAX_BLOCK_TIME
The maximum length of time in milliseconds that any part of this client manager should block at any one time. |
static int |
SERVER_DOWN_CHECK_TIME
The length of time between checks to determine whether the SLAMD server is available if it was detected that it has been taken offline. |
| Constructor Summary | |
|---|---|
ClientManager(java.lang.String serverAddress,
int serverPort,
boolean useSSL,
boolean blindTrust,
java.lang.String sslKeyStore,
java.lang.String sslKeyStorePassword,
java.lang.String sslTrustStore,
java.lang.String sslTrustStorePassword,
int maxClients,
java.lang.String startCommand,
ClientMessageWriter messageWriter)
Creates a new client manager that is intended to work with the specified SLAMD server. |
|
| Method Summary | |
|---|---|
void |
disconnect()
Closes the connection to the SLAMD server and disconnects any clients that may be connected. |
int |
nextMessageID()
Retreives the next message ID that should be used to send a message to the SLAMD server. |
void |
run()
Establishes a connection to the SLAMD server and then operates in a loop waiting for requests to arrive. |
void |
setAutoCreateClients(int autoCreateClients)
Specifies the number of client instances to create automatically when establishing a connection to the SLAMD server. |
void |
sleepBeforeReconnectAttempt()
Allows the client manager to sleep for a period of time before it checks to see if the SLAMD server is available. |
void |
startClients(int numClients)
Attempts to start the specified number of clients, presumably as a result of a start client request from the SLAMD server. |
void |
startClients(StartClientRequestMessage startClientRequest)
Attempts to start the specified number of clients, presumably as a result of a start client request from the SLAMD server. |
void |
stopClients(StopClientRequestMessage stopClientRequest)
Attempts to stop the specified number of clients, presumably as a result of a stop client request from the SLAMD server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_BLOCK_TIME
public static final int SERVER_DOWN_CHECK_TIME
| Constructor Detail |
|---|
public ClientManager(java.lang.String serverAddress,
int serverPort,
boolean useSSL,
boolean blindTrust,
java.lang.String sslKeyStore,
java.lang.String sslKeyStorePassword,
java.lang.String sslTrustStore,
java.lang.String sslTrustStorePassword,
int maxClients,
java.lang.String startCommand,
ClientMessageWriter messageWriter)
serverAddress - The address of the SLAMD server.serverPort - The port number of the SLAMD server.useSSL - Indicates whether to use SSL to communicate
with the SLAMD server.blindTrust - Indicates whether to blindly trust any SSL
certificate presented by the SLAMD server.sslKeyStore - The location of the JSSE key store.sslKeyStorePassword - The password required to access the SSL key
store.sslTrustStore - The location of the JSSE trust store.sslTrustStorePassword - The password required to access the SSL
trust store.maxClients - The maximum number of clients that may be
created on this system.startCommand - The command to execute to start a single
client instance.messageWriter - The message writer to use for output.| Method Detail |
|---|
public void setAutoCreateClients(int autoCreateClients)
autoCreateClients - The number of client instances to create
automatically when establishing a connection to
the SLAMD server.public void run()
public int nextMessageID()
public void startClients(int numClients)
numClients - The number of instances of the client to create.public void startClients(StartClientRequestMessage startClientRequest)
startClientRequest - The start client request to be processed.public void stopClients(StopClientRequestMessage stopClientRequest)
stopClientRequest - The request received from the server.public void disconnect()
public void sleepBeforeReconnectAttempt()
SERVER_DOWN_CHECK_TIME, but it can stop sooner if the
client manager is asked to shut down.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||