public class ServerConfiguration extends Object
ServiceContainerConfiguration, with some additional client-side type
preferences to support remote streaming.| Constructor and Description |
|---|
ServerConfiguration(Preferences prefs)
Wraps a preferences object in this instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAgentFilesDirectory()
This will return the directory name where the server stores all the files it can distribute to its agents.
|
ClientCommandSenderConfiguration |
getClientCommandSenderConfiguration()
This is a convienence method that returns the full client sender configuration.
|
String |
getClientSenderCommandSpoolFileName()
This will return the name of the command spool file (to be located in the
data directory). |
long[] |
getClientSenderCommandSpoolFileParams()
Returns an array of command spool file parameters.
|
long |
getClientSenderCommandTimeout()
Returns the default timeout that the client sender will wait for a command to be processed by the remote
endpoint.
|
int |
getClientSenderMaxConcurrent()
Returns the maximum number of concurrent commands that the client sender will send at any one time.
|
int |
getClientSenderMaxRetries()
Returns the number of times a guaranteed message is retried, if it fails for a reason other than a "cannot
connect" to server.
|
int |
getClientSenderQueueSize()
Returns the client sender queue size which determines how many commands can be queued up for sending.
|
int[] |
getClientSenderQueueThrottling()
Returns an array of queue throttling parameters or
null if queue throttling is to be disabled. |
long |
getClientSenderRetryInterval()
Returns the time in milliseconds the client sender should wait in between retries of commands that have failed.
|
String |
getClientSenderSecurityKeystoreAlgorithm()
Returns the algorithm used to manage the keys in the keystore.
|
String |
getClientSenderSecurityKeystoreAlias()
Returns the alias to the client's key in the keystore.
|
String |
getClientSenderSecurityKeystoreFile()
Returns the path to the keystore file.
|
String |
getClientSenderSecurityKeystoreKeyPassword()
Returns the password to gain access to the key in the keystore.
|
String |
getClientSenderSecurityKeystorePassword()
Returns the password of the keystore file itself.
|
String |
getClientSenderSecurityKeystoreType()
Returns the type of the keystore file.
|
String |
getClientSenderSecuritySocketProtocol()
Returns the protocol used over the secure socket.
|
String |
getClientSenderSecurityTruststoreAlgorithm()
Returns the algorithm used to manage the keys in the truststore.
|
String |
getClientSenderSecurityTruststoreFile()
Returns the path to the truststore file.
|
String |
getClientSenderSecurityTruststorePassword()
Returns the password of the truststore file itself.
|
String |
getClientSenderSecurityTruststoreType()
Returns the type of the truststore file.
|
long[] |
getClientSenderSendThrottling()
Returns an array of send throttling parameters or
null if send throttling is to be disabled. |
File |
getDataDirectory()
Returns the data directory where all internally persisted data can be written to.
|
String |
getDataDirectoryIfDefined()
This will return the data directory string as found in the preferences.
|
Preferences |
getPreferences()
Returns the raw preferences containing the server configuration.
|
int |
getServerConfigurationVersion()
Returns the version of the configuration schema.
|
ServiceContainerConfiguration |
getServiceContainerPreferences()
Returns the service container configuration object that provides strongly typed methods to retrieve the
server-side communications preferences.
|
boolean |
isClientSenderCommandSpoolFileCompressed()
Returns the command spool file compression flag that, if true, indicates the data in the command spool file
should be compressed.
|
long[] |
isClientSenderCommandSpoolFileParamsValueValid(String pref_value)
Given a command spool file parameters value, will determine if its valid or not.
|
int[] |
isClientSenderQueueThrottlingValueValid(String pref_value)
Given a queue throttling parameters value, will determine if its valid or not.
|
boolean |
isClientSenderSecurityServerAuthMode()
Returns
true if the server authentication mode is enabled. |
long[] |
isClientSenderSendThrottlingValueValid(String pref_value)
Given a send throttling parameters value, will determine if its valid or not.
|
void |
tagWithServerConfigurationVersion()
This tags the existing preferences by setting the configuration schema version preference appropriately.
|
String |
toString() |
public ServerConfiguration(Preferences prefs)
prefs - the configuration preferencesIllegalArgumentException - if props is nullpublic Preferences getPreferences()
public ServiceContainerConfiguration getServiceContainerPreferences()
public int getServerConfigurationVersion()
public void tagWithServerConfigurationVersion()
public File getDataDirectory()
service container configuration. See
ServiceContainerConfiguration.getDataDirectory().
Because this does alittle extra work, it may not be suitable to call if you just want to get the value of the
data directory or if you just want to know if its defined or not. In those instances, use
getDataDirectoryIfDefined() instead.
public String getDataDirectoryIfDefined()
null is returned. The data directory is the one that is defined in the
service container configuration. See
ServiceContainerConfiguration.getDataDirectoryIfDefined().null if it is not definedgetDataDirectory()public String getAgentFilesDirectory()
null is returned. If null is returned, the server is not
configured to distribute any files remotely.null if it is not definedpublic int getClientSenderQueueSize()
getClientCommandSenderConfiguration()public int getClientSenderMaxConcurrent()
getClientCommandSenderConfiguration()public long getClientSenderCommandTimeout()
getClientCommandSenderConfiguration()public long getClientSenderRetryInterval()
getClientCommandSenderConfiguration()public int getClientSenderMaxRetries()
getClientCommandSenderConfiguration()public String getClientSenderCommandSpoolFileName()
data directory). If this is not defined, null is returned to indicate
that commands should not be spooled to disk (thus implicitly disabling guaranteed delivery).null if it is not definedpublic long[] getClientSenderCommandSpoolFileParams()
PersistentFifo for the meanings of these
settings.
Because this is a weakly typed method (i.e. you have to know what the elements in the returned array
represent), it is recommended that you call getClientCommandSenderConfiguration() because it will return
all the configuration, including the spool file parameters, in a more strongly typed data object.
getClientCommandSenderConfiguration()public long[] isClientSenderCommandSpoolFileParamsValueValid(String pref_value)
null is returned.pref_value - the command spool file parameters valuenull if not validpublic boolean isClientSenderCommandSpoolFileCompressed()
true if the command spool file should compress its data; false means the data
should be stored in its uncompressed format.public long[] getClientSenderSendThrottling()
null if send throttling is to be disabled. The
first element of the array is the maximum number of commands that can be sent before the quiet period must start.
The second element is the length of time (in milliseconds) that each quiet period lasts. Once that time period
expires, commands can again be sent, up to the maximum (and the cycle repeats).
Because this is a weakly typed method (i.e. you have to know what the elements in the returned array
represent), it is recommended that you call getClientCommandSenderConfiguration() because it will return
all the configuration, including the throttling configuration, in a more strongly typed data object.
null if send throttling is disabledgetClientCommandSenderConfiguration()public long[] isClientSenderSendThrottlingValueValid(String pref_value)
null is returned. Note that if pref_value
is null, then null will be immediately returned.pref_value - the send throttling parameters valuenull if not valid or the preference value was
nullpublic int[] getClientSenderQueueThrottling()
null if queue throttling is to be disabled. The
first element of the array is the maximum number of commands that can be dequeued in a burst period before the
client sender must pause (i.e. cannot dequeue any more commands). The second element is the length of time (in
milliseconds) that each burst period lasts. Once that time period expires, commands can again be dequeued, up to
the maximum (and the cycle repeats).
Because this is a weakly typed method (i.e. you have to know what the elements in the returned array
represent), it is recommended that you call getClientCommandSenderConfiguration() because it will return
all the configuration, including the throttling configuration, in a more strongly typed data object.
null if queue throttling is disabledgetClientCommandSenderConfiguration()public int[] isClientSenderQueueThrottlingValueValid(String pref_value)
null is returned. Note that if pref_value
is null, then null will be immediately returned.pref_value - the queue throttling parameters valuenull if not valid or the preference value was
nullpublic ClientCommandSenderConfiguration getClientCommandSenderConfiguration()
public String getClientSenderSecuritySocketProtocol()
public String getClientSenderSecurityKeystoreAlias()
public String getClientSenderSecurityKeystoreFile()
String as opposed to File since
some underlying remoting code may allow for this filepath to be relative to a jar inside the classloader.public String getClientSenderSecurityKeystoreAlgorithm()
public String getClientSenderSecurityKeystoreType()
public String getClientSenderSecurityKeystorePassword()
public String getClientSenderSecurityKeystoreKeyPassword()
keystore password.public String getClientSenderSecurityTruststoreFile()
String as opposed to File since
some underlying remoting code may allow for this filepath to be relative to a jar inside the classloader.public String getClientSenderSecurityTruststoreAlgorithm()
public String getClientSenderSecurityTruststoreType()
public String getClientSenderSecurityTruststorePassword()
public boolean isClientSenderSecurityServerAuthMode()
true if the server authentication mode is enabled. If this is enabled, it means when using
secure communications, the agents' certificates will be authenticated with the certificates found in the server's
truststore. If this is false, the agents do not have to authenticate themselves with a trusted
certificate; the server will trust any remote agent (in other words, the secure communications repo will only
be used for encryption and not authentication).public String toString()
toString in class ObjectObject.toString()Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.