|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.agent.AgentConfig
public class AgentConfig
The configuration object for the AgentDaemon. This class performs validation on application properties, and provides a type-specific API for consumption by the Agent.
Field Summary | |
---|---|
static java.lang.String |
AGENT_BUNDLE_HOME
|
static java.lang.String |
BUNDLE_PROPFILE
|
static java.lang.String |
DEFAULT_AGENT_PROPFILE_NAME
|
static java.lang.String |
DEFAULT_PROPFILE
|
static java.lang.String |
DEFAULT_ROLLBACKPROPFILE
|
static java.lang.String |
HQ_PRODUCT_JAR_KEY
|
static java.lang.String |
IP_GLOBAL
|
static java.lang.String |
JSW_PROP_AGENT_BUNDLE
|
static java.lang.String |
JSW_PROP_AGENT_ROLLBACK_BUNDLE
|
static java.lang.String |
PDK_DIR_KEY
|
static java.lang.String |
PDK_LIB_DIR_KEY
|
static java.lang.String |
PDK_PLUGIN_DIR_KEY
|
static java.lang.String |
PDK_WORK_DIR_KEY
|
static java.lang.String[] |
PROP_BUNDLEHOME
|
static java.lang.String[] |
PROP_DATADIR
|
static java.lang.String[] |
PROP_INSTALLHOME
|
static java.lang.String[] |
PROP_KEYSTORE
|
static java.lang.String |
PROP_LATHER_PROXYHOST
|
static java.lang.String |
PROP_LATHER_PROXYPORT
|
static java.lang.String[] |
PROP_LIB_HANDLERS
|
static java.lang.String[] |
PROP_LIB_HANDLERS_LIB
|
static java.lang.String[] |
PROP_LISTENIP
|
static java.lang.String[] |
PROP_LISTENPORT
|
static java.lang.String[] |
PROP_LOGDIR
|
static java.lang.String[] |
PROP_PDK_DIR
|
static java.lang.String[] |
PROP_PDK_LIB_DIR
|
static java.lang.String[] |
PROP_PDK_PLUGIN_DIR
|
static java.lang.String[] |
PROP_PDK_WORK_DIR
|
static java.lang.String |
PROP_PROPFILE
|
static java.lang.String[] |
PROP_PROXYHOST
|
static java.lang.String[] |
PROP_PROXYPORT
|
static java.lang.String[] |
PROP_ROLLBACK_AGENT_BUNDLE_UPGRADE
|
static java.lang.String[] |
PROP_STORAGEPROVIDER
|
static java.lang.String[] |
PROP_STORAGEPROVIDERINFO
|
static java.lang.String[] |
PROP_TMPDIR
|
static java.lang.String |
ROLLBACK_PROPFILE
|
Method Summary | |
---|---|
java.util.Properties |
getBootProperties()
Get the boot properties used when creating the agent configuration. |
static java.util.Properties |
getDefaultProperties()
Get a Properties object with default invocation properties for the Agent. |
java.lang.String |
getListenIp()
Get the Agent listening address. |
java.net.InetAddress |
getListenIpAsAddr()
Get the listen IP address as an InetAddress object. |
int |
getListenPort()
Get the Agent listening port. |
int |
getNotifyUpPort()
|
static java.util.Properties |
getProperties(java.lang.String propsFile)
Return a Properties object that is the merged result all possible locations for agent.properties. |
static java.io.File[] |
getPropertyFiles(java.lang.String propsFile)
Return an ordered list of property files used to configure the agent. |
java.lang.String |
getProxyIp()
Get the IP for the proxy server. |
int |
getProxyPort()
Get the proxy port. |
java.lang.String |
getStorageProvider()
Gets the storage provider the Agent will use. |
java.lang.String |
getStorageProviderInfo()
Get the info string passed to the init() function of the storage provider. |
java.lang.String |
getTokenFile()
|
boolean |
isProxyServerSet()
|
static AgentConfig |
newInstance()
Create a new config object with default settings. |
static AgentConfig |
newInstance(java.util.Properties props)
Create a new config object with settings specified by a properties object. |
static AgentConfig |
newInstance(java.lang.String propsFile)
|
void |
setListenIp(java.lang.String ip)
Sets the IP that the agent should listen on. |
void |
setListenPort(int port)
Sets the port the Agent should listen on. |
void |
setNotifyUpPort(int port)
Sets the port which the AgentClient defines where the CommandServer can connect to notify it of successful startup. |
void |
setProxyIp(java.lang.String ip)
Set the IP for the proxy server. |
void |
setProxyPort(int port)
Sets the proxy port. |
void |
setStorageProvider(java.lang.String storageProvider)
Set the classpath of the storage provider. |
void |
setStorageProviderInfo(java.lang.String info)
Sets the info string that the Agent will use to pass to the init() function of the storage provider. |
void |
useProperties(java.util.Properties appProps)
Set the configuration based on a properties object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JSW_PROP_AGENT_BUNDLE
public static final java.lang.String JSW_PROP_AGENT_ROLLBACK_BUNDLE
public static final java.lang.String PROP_LATHER_PROXYHOST
public static final java.lang.String PROP_LATHER_PROXYPORT
public static final java.lang.String IP_GLOBAL
public static final java.lang.String PDK_DIR_KEY
public static final java.lang.String PDK_LIB_DIR_KEY
public static final java.lang.String PDK_PLUGIN_DIR_KEY
public static final java.lang.String PDK_WORK_DIR_KEY
public static final java.lang.String AGENT_BUNDLE_HOME
public static final java.lang.String HQ_PRODUCT_JAR_KEY
public static final java.lang.String[] PROP_LISTENPORT
public static final java.lang.String[] PROP_LISTENIP
public static final java.lang.String[] PROP_STORAGEPROVIDER
public static final java.lang.String[] PROP_STORAGEPROVIDERINFO
public static final java.lang.String[] PROP_INSTALLHOME
public static final java.lang.String[] PROP_BUNDLEHOME
public static final java.lang.String[] PROP_TMPDIR
public static final java.lang.String[] PROP_LOGDIR
public static final java.lang.String[] PROP_DATADIR
public static final java.lang.String[] PROP_KEYSTORE
public static final java.lang.String[] PROP_LIB_HANDLERS
public static final java.lang.String[] PROP_LIB_HANDLERS_LIB
public static final java.lang.String[] PROP_PDK_DIR
public static final java.lang.String[] PROP_PDK_LIB_DIR
public static final java.lang.String[] PROP_PDK_PLUGIN_DIR
public static final java.lang.String[] PROP_PDK_WORK_DIR
public static final java.lang.String[] PROP_PROXYHOST
public static final java.lang.String[] PROP_PROXYPORT
public static final java.lang.String[] PROP_ROLLBACK_AGENT_BUNDLE_UPGRADE
public static final java.lang.String PROP_PROPFILE
public static final java.lang.String DEFAULT_AGENT_PROPFILE_NAME
public static final java.lang.String DEFAULT_PROPFILE
public static final java.lang.String ROLLBACK_PROPFILE
public static final java.lang.String DEFAULT_ROLLBACKPROPFILE
public static final java.lang.String BUNDLE_PROPFILE
Method Detail |
---|
public static AgentConfig newInstance()
public static java.io.File[] getPropertyFiles(java.lang.String propsFile)
propsFile
- The default agent.properties
public static java.util.Properties getProperties(java.lang.String propsFile) throws AgentConfigException
propsFile
- The default agent.properties.
AgentConfigException
getPropertyFiles(String)
public static AgentConfig newInstance(java.lang.String propsFile) throws java.io.IOException, AgentConfigException
java.io.IOException
AgentConfigException
public static AgentConfig newInstance(java.util.Properties props) throws AgentConfigException
props
- Properties to use when setting up the config object
AgentConfigException
- indicating the passed configuration was
invalid.public static java.util.Properties getDefaultProperties()
public void useProperties(java.util.Properties appProps) throws AgentConfigException
appProps
- Properties to use to setup the object
AgentConfigException
- indicating the passed configuration was
invalid.public void setListenPort(int port) throws AgentConfigException
port
- New port to set. The port should be in the range of
1 to 65535
AgentConfigException
- indicating the port was not within a valid
rangepublic int getListenPort()
public void setListenIp(java.lang.String ip)
ip
- The IP to bind to. If it is '*', then the agent will
listen on all interfacespublic java.lang.String getListenIp()
public void setProxyPort(int port) throws AgentConfigException
port
- New port to set. The port should be in the range of
1 to 65535
AgentConfigException
- indicating the port was not within a valid
rangepublic boolean isProxyServerSet()
true
if a proxy server is configured;
false
otherwise.public int getProxyPort()
-1
if no proxy server is set.public void setProxyIp(java.lang.String ip)
ip
- The IP for the proxy server.public java.lang.String getProxyIp()
public java.net.InetAddress getListenIpAsAddr() throws java.net.UnknownHostException
java.net.UnknownHostException
- if the listenIP lookup fails.public int getNotifyUpPort()
public void setNotifyUpPort(int port) throws AgentConfigException
port
- New port to set. The port should be in the range of
1 to 65535
AgentConfigException
- indicating the port was not within a valid
rangepublic void setStorageProvider(java.lang.String storageProvider)
storageProvider
- Fully qualified classname for a class
implementing the AgentStorageProvider interfacepublic java.lang.String getStorageProvider()
public void setStorageProviderInfo(java.lang.String info)
info
- Info string to pass to init()public java.lang.String getStorageProviderInfo()
public java.util.Properties getBootProperties()
public java.lang.String getTokenFile()
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |