org.rhq.enterprise.agent
Class AgentConfiguration

java.lang.Object
  extended by org.rhq.enterprise.agent.AgentConfiguration

public class AgentConfiguration
extends Object

Just provides some convienence methods to extract agent configuration properties.

Author:
John Mazzitelli

Constructor Summary
AgentConfiguration(Preferences prefs)
          Wraps a preferences object in this instance.
 
Method Summary
static String buildServerLocatorUri(String transport, String bind_address, int bind_port, String transport_params)
          This is a static utility method that builds a full remote endpoint string that combines the given transport, server bind address, server bind port and server transport params.
 boolean doNotEnableManagementServices()
          If true is returned, this will tell the agent it should not create its management services.
 boolean doNotNotifyServerOfShutdown()
          If true is returned, this will tell the agent it should not tell the server that the agent is shutting down.
 boolean doNotOverridePreferencesWithSystemProperties()
          If true is returned, this will tell the agent it should not overlay system properties over the agent configuration preferences.
 boolean doNotStartPluginContainerAtStartup()
          If true is returned, this will tell the agent it should not start the Plugin Container at startup.
 int getAgentConfigurationVersion()
          Returns the version of the configuration schema.
 String getAgentName()
          Returns the unique name that this agent will be known as.
 String getAgentSecurityToken()
          This returns the agent's security token that it needs to send with its commands to the server.
 String getAgentUpdateDownloadUrl()
          This will return the URL that the agent should use when it needs to download the latest agent update binary.
 String getAgentUpdateDownloadUrlIfDefined()
          This will return the URL that the agent should use when it needs to download the latest agent update binary.
 String getAgentUpdateVersionUrl()
          This will return the URL that the agent should use when it needs to find out the version information of the latest agent update binary.
 String getAgentUpdateVersionUrlIfDefined()
          This will return the URL that the agent should use when it needs to find out the version information of the latest agent update binary.
 ClientCommandSenderConfiguration getClientCommandSenderConfiguration()
          This is a convienence method that returns the full client sender configuration.
 String getClientSenderCommandPreprocessors()
          This will return the fully qualified class name of the command preprocessor object that the sender will use to preprocess all commands that are to be queued and sent.
 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 server.
 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.
 long[] 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.
 long getClientSenderServerPollingInterval()
          Returns the interval the client sender should wait in between polling the server.
 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.
 PluginContainerConfiguration getPluginContainerConfiguration()
          This will return all the individual plugin container configuration preferences in a configuration object.
 Preferences getPreferences()
          Returns the raw preferences containing the agent configuration.
 long getPrimaryServerSwitchoverCheckIntervalMsecs()
          This defines how many milliseconds the agent should wait between each check that ensures it is connected to the primary server, as opposed to one of its failure servers.
 String getServerBindAddress()
          Returns the RHQ Server's bind address on which it is listening for incoming commands.
 int getServerBindPort()
          Returns the RHQ Server's bind port on which it is listening for incoming commands.
 String getServerLocatorUri()
          This is a convienence method that builds a full remote endpoint string that combines getServerTransport(), getServerBindAddress(), getServerBindPort(), and getServerTransportParams().
 String getServerTransport()
          Returns the RHQ Server's transport type (socket, http, etc).
 String getServerTransportParams()
          Returns the RHQ Server's transport parameters which are used to further customize the RHQ Server and its transport subsystem.
 ServiceContainerConfiguration getServiceContainerPreferences()
          Returns the service container configuration object that provides strongly typed methods to retrieve the server-side communications preferences as configured by the agent.
 long getVMHealthCheckIntervalMsecs()
          This defines how many milliseconds the agent should wait between each check that determines if the VM is healthy or not (such as if the VM is critically low on memory).
 float getVMHealthCheckLowHeapMemThreshold()
          This defines when the VM health check will consider the heap memory to be critically low.
 float getVMHealthCheckLowNonHeapMemThreshold()
          This defines when the VM health check will consider the nonheap memory to be critically low.
 long getWaitForServerAtStartupMsecs()
          This defines how many milliseconds the agent should wait at startup for the RHQ Server to be detected.
 boolean isAgentConfigurationSetup()
          This returns true if the agent has already been setup - meaning the user has properly configured the agent with the appropriate preferences.
 boolean isAgentUpdateEnabled()
          Returns true if the agent is allowed to apply updates to itself.
 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.
 long[] 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.
 boolean isNativeSystemDisabled()
          Returns true if the native system should be disabled and not used by the agent or its plugin container.
 boolean isRegisterWithServerAtStartupEnabled()
          Returns true if the agent should register itself with the RHQ Server when the agent starts up.
 boolean isServerAutoDetectionEnabled()
          Returns the auto-detection flag that, if true, tells the agent to attempt to auto-detect the RHQ Server coming online and going offline.
 boolean isUpdatePluginsAtStartupEnabled()
          Returns true if the agent should update its plugins when the agent starts up.
 void setAgentConfigurationSetup(boolean flag)
          Sets the flag to indicate if the agent configuration has already been setup or not.
 void setAgentSecurityToken(String value)
          Sets the agent's security token that was received from the server during agent registration.
 void setServerLocatorUri(String transport, String bindAddress, int bindPort, String transportParams)
          Convienence method that sets the transport, bind address, bind port and transport parameters for a new server endpoint.
 void tagWithAgentConfigurationVersion()
          This tags the existing preferences by setting the configuration schema version preference appropriately.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgentConfiguration

public AgentConfiguration(Preferences prefs)
Wraps a preferences object in this instance.

Parameters:
prefs - the agent configuration preferences
Throws:
IllegalArgumentException - if props is null
Method Detail

buildServerLocatorUri

public static String buildServerLocatorUri(String transport,
                                           String bind_address,
                                           int bind_port,
                                           String transport_params)
This is a static utility method that builds a full remote endpoint string that combines the given transport, server bind address, server bind port and server transport params. This is used to get the full server URI but can be used to any other caller if they happen to have those four pieces of data.

Parameters:
transport -
bind_address -
bind_port -
transport_params -
Returns:
a locator URI that can be used to try to communicate with an endpoint

getPreferences

public Preferences getPreferences()
Returns the raw preferences containing the agent configuration.

Returns:
the agent configuration preferences

getServiceContainerPreferences

public ServiceContainerConfiguration getServiceContainerPreferences()
Returns the service container configuration object that provides strongly typed methods to retrieve the server-side communications preferences as configured by the agent.

Returns:
server-side communications preferences

getAgentConfigurationVersion

public int getAgentConfigurationVersion()
Returns the version of the configuration schema.

Returns:
configuration version; if the configuration isn't versioned, 0 is returned

tagWithAgentConfigurationVersion

public void tagWithAgentConfigurationVersion()
This tags the existing preferences by setting the configuration schema version preference appropriately.


isAgentConfigurationSetup

public boolean isAgentConfigurationSetup()
This returns true if the agent has already been setup - meaning the user has properly configured the agent with the appropriate preferences. This is done either through custom configuration file or the setup prompt command.

Returns:
true if the agent configuration was already setup, false if it has not been setup

setAgentConfigurationSetup

public void setAgentConfigurationSetup(boolean flag)
Sets the flag to indicate if the agent configuration has already been setup or not. true means the agent has already been setup with the user-provided configuration preference values. false means the user has not setup the agent.

Parameters:
flag -

getAgentName

public String getAgentName()
Returns the unique name that this agent will be known as. This name is unique among all other agents in the system. This value is usually, but doesn't have to be, the agent platform's fully qualified domain name. If the agent configuration doesn't explicitly define the agent's name null will be returned, which is usually a bad condition. An agent should never be started unless it had an agent name defined.

Returns:
the agent's name

getServerTransport

public String getServerTransport()
Returns the RHQ Server's transport type (socket, http, etc).

Returns:
the server transport type

getServerBindAddress

public String getServerBindAddress()
Returns the RHQ Server's bind address on which it is listening for incoming commands. If the preference value isn't set, this will look up a default hostname for the default server address to use. If that isn't available or defined, the local host address will be used.

Returns:
the RHQ Server bind address

getServerBindPort

public int getServerBindPort()
Returns the RHQ Server's bind port on which it is listening for incoming commands.

Returns:
the RHQ Server's bind port

getServerTransportParams

public String getServerTransportParams()
Returns the RHQ Server's transport parameters which are used to further customize the RHQ Server and its transport subsystem.

Returns:
the RHQ Server transport parameters

getServerLocatorUri

public String getServerLocatorUri()
This is a convienence method that builds a full remote endpoint string that combines getServerTransport(), getServerBindAddress(), getServerBindPort(), and getServerTransportParams().

Returns:
the locator URI that should be used to try to communicate with the RHQ Server.
See Also:
buildServerLocatorUri(String, String, int, String)

setServerLocatorUri

public void setServerLocatorUri(String transport,
                                String bindAddress,
                                int bindPort,
                                String transportParams)
Convienence method that sets the transport, bind address, bind port and transport parameters for a new server endpoint. This should be used only when the agent needs to switch to a new server.

Parameters:
transport - see getServerTransport()
bindAddress - see getServerBindAddress()
bindPort - see getServerBindPort()
transportParams - see getServerTransportParams()

isServerAutoDetectionEnabled

public boolean isServerAutoDetectionEnabled()
Returns the auto-detection flag that, if true, tells the agent to attempt to auto-detect the RHQ Server coming online and going offline.

Returns:
true if the agent should listen for the server coming online and going offline; false if the agent won't attempt to auto-discover the server (which means some other mechanism must be used to know when the client command sender should start and stop sending messages)

isRegisterWithServerAtStartupEnabled

public boolean isRegisterWithServerAtStartupEnabled()
Returns true if the agent should register itself with the RHQ Server when the agent starts up. If false, the agent will not automatically attempt to register itself at startup - in which case the agent will assume it is either already registered or it will get registered by some other mechanism.

Returns:
true if the agent should try to register itself when it starts up

getWaitForServerAtStartupMsecs

public long getWaitForServerAtStartupMsecs()
This defines how many milliseconds the agent should wait at startup for the RHQ Server to be detected. If the RHQ Server has not started up in the given amount of time, the agent will continue initializing and expect the server to come up later. If this is 0, the agent will not wait at all.

Returns:
wait time in milliseconds
See Also:
getClientCommandSenderConfiguration()

isAgentUpdateEnabled

public boolean isAgentUpdateEnabled()
Returns true if the agent is allowed to apply updates to itself. This means that the agent will be enabled to process agent update binaries, effectively upgrading the agent to a newer version.

Returns:
true if the agent is allowed to update itself

getAgentUpdateVersionUrlIfDefined

public String getAgentUpdateVersionUrlIfDefined()
This will return the URL that the agent should use when it needs to find out the version information of the latest agent update binary.

Returns:
version URL if defined, null if not defined

getAgentUpdateVersionUrl

public String getAgentUpdateVersionUrl()
This will return the URL that the agent should use when it needs to find out the version information of the latest agent update binary.

If the URL is not defined, this will return a default URL that points to this agent's server. If the server transport is secure, the URL returned will be over "https", otherwise, it will go over "http". The server address and server port will be the same regardless of the security transport.

Returns:
version URL

getAgentUpdateDownloadUrlIfDefined

public String getAgentUpdateDownloadUrlIfDefined()
This will return the URL that the agent should use when it needs to download the latest agent update binary.

Returns:
download URL if defined, null if not defined

getAgentUpdateDownloadUrl

public String getAgentUpdateDownloadUrl()
This will return the URL that the agent should use when it needs to download the latest agent update binary.

If the URL is not defined, this will return a default URL that points to this agent's server. If the server transport is secure, the URL returned will be over "https", otherwise, it will go over "http". The server address and server port will be the same regardless of the security transport.

Returns:
version URL

getPrimaryServerSwitchoverCheckIntervalMsecs

public long getPrimaryServerSwitchoverCheckIntervalMsecs()
This defines how many milliseconds the agent should wait between each check that ensures it is connected to the primary server, as opposed to one of its failure servers.

Returns:
check interval time in milliseconds

getVMHealthCheckIntervalMsecs

public long getVMHealthCheckIntervalMsecs()
This defines how many milliseconds the agent should wait between each check that determines if the VM is healthy or not (such as if the VM is critically low on memory).

Returns:
check interval time in milliseconds

getVMHealthCheckLowHeapMemThreshold

public float getVMHealthCheckLowHeapMemThreshold()
This defines when the VM health check will consider the heap memory to be critically low. This is a percentage of used heap memory to max heap - when used heap is larger than this percentage of max, the VM will be considered critically low on heap memory.

Returns:
threshold percentage, as a float

getVMHealthCheckLowNonHeapMemThreshold

public float getVMHealthCheckLowNonHeapMemThreshold()
This defines when the VM health check will consider the nonheap memory to be critically low. This is a percentage of used nonheap memory to max nonheap - when used nonheap is larger than this percentage of max, the VM will be considered critically low on nonheap memory.

Returns:
threshold percentage, as a float

isUpdatePluginsAtStartupEnabled

public boolean isUpdatePluginsAtStartupEnabled()
Returns true if the agent should update its plugins when the agent starts up. If false, the agent will not automatically update the plugins and will use it current plugins. Note that the side effect of this being true is that the agent will block waiting for at least one plugin to be available before the plugin container starts. In other words, if this flag is true, a newly installed agent will not fully complete its startup until it has downloaded its plugins.

Returns:
true if the agent should try to update its plugins at startup

getDataDirectory

public File getDataDirectory()
Returns the data directory where all internally persisted data can be written to. If the data directory does not exist, it will be created.

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.

Returns:
the data directory

getDataDirectoryIfDefined

public String getDataDirectoryIfDefined()
This will return the data directory string as found in the preferences. If the data directory is not defined in the preferences, null is returned.

Returns:
the data directory string as defined in the preferences or null if it is not defined
See Also:
getDataDirectory()

isNativeSystemDisabled

public boolean isNativeSystemDisabled()
Returns true if the native system should be disabled and not used by the agent or its plugin container. false means the agent/plugin container is allowed to load in and use the native libraries.

Returns:
true if the native system should not be loaded or used

getClientSenderQueueSize

public int getClientSenderQueueSize()
Returns the client sender queue size which determines how many commands can be queued up for sending. If this is 0 or less, it means the queue is unbounded.

Returns:
queue size
See Also:
getClientCommandSenderConfiguration()

getClientSenderMaxConcurrent

public int getClientSenderMaxConcurrent()
Returns the maximum number of concurrent commands that the client sender will send at any one time.

Returns:
max concurrent value
See Also:
getClientCommandSenderConfiguration()

getClientSenderCommandTimeout

public long getClientSenderCommandTimeout()
Returns the default timeout that the client sender will wait for a command to be processed by the server. The timeout may be less than or equal to zero in which case the default will be to never timeout commands.

Returns:
timeout in milliseconds
See Also:
getClientCommandSenderConfiguration()

getClientSenderServerPollingInterval

public long getClientSenderServerPollingInterval()
Returns the interval the client sender should wait in between polling the server. If this value is 0 or less, server polling should be disabled.

Returns:
server polling interval in milliseconds
See Also:
getClientCommandSenderConfiguration()

getClientSenderRetryInterval

public long getClientSenderRetryInterval()
Returns the time in milliseconds the client sender should wait in between retries of commands that have failed. This is a minimum but by no means is the limit before the command must be retried. The command may, in fact, be retried any amount of time after this retry interval.

Returns:
retry interval in milliseconds
See Also:
getClientCommandSenderConfiguration()

getClientSenderMaxRetries

public 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.

Returns:
maximum number of retry attempts that will be made to send a guaranteed delivery message when it fails for some reason other than being unable to communicate with the server.
See Also:
getClientCommandSenderConfiguration()

getClientSenderCommandSpoolFileName

public String getClientSenderCommandSpoolFileName()
This will return the name of the command spool file (to be located in the 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).

Returns:
the command spool file name or null if it is not defined

getClientSenderCommandSpoolFileParams

public long[] getClientSenderCommandSpoolFileParams()
Returns an array of command spool file parameters. The first element of the array is the maximum file size threshold. The second element is the purge percentage. See 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.

Returns:
array of command spool file parameters
See Also:
getClientCommandSenderConfiguration()

isClientSenderCommandSpoolFileParamsValueValid

public long[] isClientSenderCommandSpoolFileParamsValueValid(String pref_value)
Given a command spool file parameters value, will determine if its valid or not. If its valid, its individual parameter values are returned. If not valid, null is returned.

Parameters:
pref_value - the command spool file parameters value
Returns:
the individual parameters values or null if not valid

isClientSenderCommandSpoolFileCompressed

public boolean isClientSenderCommandSpoolFileCompressed()
Returns the command spool file compression flag that, if true, indicates the data in the command spool file should be compressed.

Returns:
true if the command spool file should compress its data; false means the data should be stored in its uncompressed format.

getClientSenderSendThrottling

public long[] getClientSenderSendThrottling()
Returns an array of send throttling parameters or 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.

Returns:
array of send throttling parameters, null if send throttling is disabled
See Also:
getClientCommandSenderConfiguration()

isClientSenderSendThrottlingValueValid

public long[] isClientSenderSendThrottlingValueValid(String pref_value)
Given a send throttling parameters value, will determine if its valid or not. If its valid, its individual parameter values are returned. If not valid, null is returned. Note that if pref_value is null, then null will be immediately returned.

Parameters:
pref_value - the send throttling parameters value
Returns:
the individual parameters values or null if not valid or the preference value was null

getClientSenderQueueThrottling

public long[] getClientSenderQueueThrottling()
Returns an array of queue throttling parameters or 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.

Returns:
array of queue throttling parameters, null if queue throttling is disabled
See Also:
getClientCommandSenderConfiguration()

isClientSenderQueueThrottlingValueValid

public long[] isClientSenderQueueThrottlingValueValid(String pref_value)
Given a queue throttling parameters value, will determine if its valid or not. If its valid, its individual parameter values are returned. If not valid, null is returned. Note that if pref_value is null, then null will be immediately returned.

Parameters:
pref_value - the queue throttling parameters value
Returns:
the individual parameters values or null if not valid or the preference value was null

getClientSenderCommandPreprocessors

public String getClientSenderCommandPreprocessors()
This will return the fully qualified class name of the command preprocessor object that the sender will use to preprocess all commands that are to be queued and sent. If this returns an empty string, no preprocessing will be performed by the sender. Note that the returned string may consist of multiple class names, in which case they will be separated from one another via colon characters (:).

Returns:
the command preprocessor class name (may be null)

getClientCommandSenderConfiguration

public ClientCommandSenderConfiguration getClientCommandSenderConfiguration()
This is a convienence method that returns the full client sender configuration. It combines all the getClientSenderXXX methods and puts all the data in the returned data object.

Returns:
the full client sender configuration

getClientSenderSecuritySocketProtocol

public String getClientSenderSecuritySocketProtocol()
Returns the protocol used over the secure socket.

Returns:
protocol name

getClientSenderSecurityKeystoreAlias

public String getClientSenderSecurityKeystoreAlias()
Returns the alias to the client's key in the keystore.

Returns:
alias name

getClientSenderSecurityKeystoreFile

public String getClientSenderSecurityKeystoreFile()
Returns the path to the keystore file. This returns a String as opposed to File since some underlying remoting code may allow for this filepath to be relative to a jar inside the classloader.

Returns:
keystore file path

getClientSenderSecurityKeystoreAlgorithm

public String getClientSenderSecurityKeystoreAlgorithm()
Returns the algorithm used to manage the keys in the keystore.

Returns:
algorithm name

getClientSenderSecurityKeystoreType

public String getClientSenderSecurityKeystoreType()
Returns the type of the keystore file.

Returns:
keystore file type

getClientSenderSecurityKeystorePassword

public String getClientSenderSecurityKeystorePassword()
Returns the password of the keystore file itself.

Returns:
keystore file password

getClientSenderSecurityKeystoreKeyPassword

public String getClientSenderSecurityKeystoreKeyPassword()
Returns the password to gain access to the key in the keystore. If no key password is configured, this returns the keystore password.

Returns:
password to the key

getClientSenderSecurityTruststoreFile

public String getClientSenderSecurityTruststoreFile()
Returns the path to the truststore file. This returns a String as opposed to File since some underlying remoting code may allow for this filepath to be relative to a jar inside the classloader.

Returns:
truststore file path

getClientSenderSecurityTruststoreAlgorithm

public String getClientSenderSecurityTruststoreAlgorithm()
Returns the algorithm used to manage the keys in the truststore.

Returns:
algorithm name

getClientSenderSecurityTruststoreType

public String getClientSenderSecurityTruststoreType()
Returns the type of the truststore file.

Returns:
truststore file type

getClientSenderSecurityTruststorePassword

public String getClientSenderSecurityTruststorePassword()
Returns the password of the truststore file itself.

Returns:
truststore file password

isClientSenderSecurityServerAuthMode

public boolean isClientSenderSecurityServerAuthMode()
Returns true if the server authentication mode is enabled. If this is enabled, it means when using secure communications, the server certificate will be authenticated with the certificates found in the agent's truststore. If this is false, the server does not have to authenticate itself with a trusted certificate; the agent will trust any remote server (in other words, the secure communications repo will only be used for encryption and not authentication).

Returns:
server authenticate mode

getPluginContainerConfiguration

public PluginContainerConfiguration getPluginContainerConfiguration()
This will return all the individual plugin container configuration preferences in a configuration object.

Returns:
plugin container configuration

getAgentSecurityToken

public String getAgentSecurityToken()
This returns the agent's security token that it needs to send with its commands to the server. If null, it means the agent has not yet been registered with the server.

Returns:
security token the agent has been given by the server when it registered (may be null)

setAgentSecurityToken

public void setAgentSecurityToken(String value)
Sets the agent's security token that was received from the server during agent registration. This may be set to null which removes the agent token; however, this does not mean the agent itself is no longer registered with the server. The server will still maintain a registration for the agent.

Parameters:
value -

doNotEnableManagementServices

public boolean doNotEnableManagementServices()
If true is returned, this will tell the agent it should not create its management services. In this case, the agent cannot monitor itself, since the agent plugin will need these management MBean services.

This is usually used only during testing - not really of practical use.

Returns:
plugin container startup flag

doNotStartPluginContainerAtStartup

public boolean doNotStartPluginContainerAtStartup()
If true is returned, this will tell the agent it should not start the Plugin Container at startup. In this case, the only way for the agent to start the plugin container would be with the plugin container prompt command via the agent command line.

This is usually used only during testing - not really of practical use.

Returns:
plugin container startup flag

doNotNotifyServerOfShutdown

public boolean doNotNotifyServerOfShutdown()
If true is returned, this will tell the agent it should not tell the server that the agent is shutting down. In this case, the agent shutdown will be faster because it won't try to send a message to the server, however, it will cause the server to not know of the agent's unavailability.

This is usually used only during testing - not really of practical use.

Returns:
server shutdown notification flag

doNotOverridePreferencesWithSystemProperties

public boolean doNotOverridePreferencesWithSystemProperties()
If true is returned, this will tell the agent it should not overlay system properties over the agent configuration preferences. The default is that the agent will look at system properties and, if there is one that is the same name as a preference, the system property will take effect and override the preference. If this is true, system properties will be ignored and never override preferences.

Returns:
system property override flag

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.