Class CommandLineClientManager

java.lang.Object
  extended by CommandLineClientManager
All Implemented Interfaces:
ClientMessageWriter

public class CommandLineClientManager
extends java.lang.Object
implements ClientMessageWriter

This class provides an implementation of a client manager that may be used to automate the process of connecting and disconnecting clients to and from the SLAMD server.

Author:
Neil A. Wilson

Field Summary
static java.lang.String DEFAULT_START_COMMAND
          The default command that will be used to start the client manager if none is provided.
static java.lang.String DEFAULT_START_COMMAND_WINDOWS
          The default command that will be used to start the client manager on Windows systems if none is provided.
static java.lang.String PROPERTY_AUTO_CREATE_CLIENTS
          The name of the configuration property that specifies how many clients to automatically create when connecting to the SLAMD server.
static java.lang.String PROPERTY_BLIND_TRUST
          The name of the configuration property that specifies whether to blindly trust any certificate.
static java.lang.String PROPERTY_KEY_PASS
          The name of the configuration property that specifies the password for the SSL keystore.
static java.lang.String PROPERTY_KEY_STORE
          The name of the configuration property that specifies the path to the SSL keystore.
static java.lang.String PROPERTY_MAX_CLIENTS
          The name of the configuration property that specifies the maximum number of concurrent client instances that should be allowed by the client manager.
static java.lang.String PROPERTY_SLAMD_ADDRESS
          The name of the configuration property that specifies the address of the SLAMD server.
static java.lang.String PROPERTY_SLAMD_MANAGER_PORT
          The name of the configuration property that specifies the client manager port for the SLAMD server.
static java.lang.String PROPERTY_TRUST_PASS
          The name of the configuration property that specifies the password for the SSL trust store.
static java.lang.String PROPERTY_TRUST_STORE
          The name of the configuration property that specifies the path to the SSL trust store.
static java.lang.String PROPERTY_USE_SSL
          The name of the configuration property that specifies whether to use SSL.
static java.lang.String PROPERTY_VERBOSE
          The name of the configuration property that specifies whether to enable verbose mode.
 
Constructor Summary
CommandLineClientManager(java.lang.String[] args)
          Creates a new instance of this client manager.
 
Method Summary
static void displayUsage()
          Displays the usage information for this program on standard error.
static void main(java.lang.String[] args)
          Creates a new instance of this client manager.
 void processConfigFile(java.lang.String configFile)
          Processes the contents of the specified config file.
 boolean usingVerboseMode()
          Indicates whether this message writer is operating in verbose mode.
 void writeMessage(java.lang.String message)
          Writes the provided message to this message writer.
 void writeVerbose(java.lang.String message)
          Writes the provided message if this message writer is operating in verbose mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_SLAMD_ADDRESS

public static final java.lang.String PROPERTY_SLAMD_ADDRESS
The name of the configuration property that specifies the address of the SLAMD server.

See Also:
Constant Field Values

PROPERTY_SLAMD_MANAGER_PORT

public static final java.lang.String PROPERTY_SLAMD_MANAGER_PORT
The name of the configuration property that specifies the client manager port for the SLAMD server.

See Also:
Constant Field Values

PROPERTY_USE_SSL

public static final java.lang.String PROPERTY_USE_SSL
The name of the configuration property that specifies whether to use SSL.

See Also:
Constant Field Values

PROPERTY_BLIND_TRUST

public static final java.lang.String PROPERTY_BLIND_TRUST
The name of the configuration property that specifies whether to blindly trust any certificate.

See Also:
Constant Field Values

PROPERTY_KEY_STORE

public static final java.lang.String PROPERTY_KEY_STORE
The name of the configuration property that specifies the path to the SSL keystore.

See Also:
Constant Field Values

PROPERTY_KEY_PASS

public static final java.lang.String PROPERTY_KEY_PASS
The name of the configuration property that specifies the password for the SSL keystore.

See Also:
Constant Field Values

PROPERTY_TRUST_STORE

public static final java.lang.String PROPERTY_TRUST_STORE
The name of the configuration property that specifies the path to the SSL trust store.

See Also:
Constant Field Values

PROPERTY_TRUST_PASS

public static final java.lang.String PROPERTY_TRUST_PASS
The name of the configuration property that specifies the password for the SSL trust store.

See Also:
Constant Field Values

PROPERTY_VERBOSE

public static final java.lang.String PROPERTY_VERBOSE
The name of the configuration property that specifies whether to enable verbose mode.

See Also:
Constant Field Values

PROPERTY_AUTO_CREATE_CLIENTS

public static final java.lang.String PROPERTY_AUTO_CREATE_CLIENTS
The name of the configuration property that specifies how many clients to automatically create when connecting to the SLAMD server.

See Also:
Constant Field Values

PROPERTY_MAX_CLIENTS

public static final java.lang.String PROPERTY_MAX_CLIENTS
The name of the configuration property that specifies the maximum number of concurrent client instances that should be allowed by the client manager.

See Also:
Constant Field Values

DEFAULT_START_COMMAND

public static final java.lang.String DEFAULT_START_COMMAND
The default command that will be used to start the client manager if none is provided. Note that this does not apply to Windows systems, as they require a different default command.

See Also:
Constant Field Values

DEFAULT_START_COMMAND_WINDOWS

public static final java.lang.String DEFAULT_START_COMMAND_WINDOWS
The default command that will be used to start the client manager on Windows systems if none is provided.

See Also:
Constant Field Values
Constructor Detail

CommandLineClientManager

public CommandLineClientManager(java.lang.String[] args)
Creates a new instance of this client manager.

Parameters:
args - The command-line arguments provided to this client manager.
Method Detail

main

public static void main(java.lang.String[] args)
Creates a new instance of this client manager.

Parameters:
args - The command-line arguments provided to this client manager.

processConfigFile

public void processConfigFile(java.lang.String configFile)
Processes the contents of the specified config file.

Parameters:
configFile - The path to the configuration file to process.

displayUsage

public static void displayUsage()
Displays the usage information for this program on standard error.


writeMessage

public void writeMessage(java.lang.String message)
Writes the provided message to this message writer.

Specified by:
writeMessage in interface ClientMessageWriter
Parameters:
message - The message to be written.

writeVerbose

public void writeVerbose(java.lang.String message)
Writes the provided message if this message writer is operating in verbose mode.

Specified by:
writeVerbose in interface ClientMessageWriter
Parameters:
message - The message to be written.

usingVerboseMode

public boolean usingVerboseMode()
Indicates whether this message writer is operating in verbose mode.

Specified by:
usingVerboseMode in interface ClientMessageWriter
Returns:
true if this message writer is operating in verbose mode, or false if not.