|
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.server.monitor.AgentMonitorSimple
org.hyperic.hq.agent.server.AgentDaemon
public class AgentDaemon
The main daemon which processes requests from clients. The Agent has the responsibility of being the 'live' entity on remote machines. Bootstrap configuration is done entirely within this class.
Nested Class Summary | |
---|---|
static class |
AgentDaemon.RunnableAgent
|
Field Summary | |
---|---|
static java.lang.String |
NOTIFY_AGENT_DOWN
|
static java.lang.String |
NOTIFY_AGENT_FAILED_START
|
static java.lang.String |
NOTIFY_AGENT_UP
|
static java.lang.String |
PROP_CERTDN
|
static java.lang.String |
PROP_HOSTNAME
|
Fields inherited from interface org.hyperic.hq.agent.server.monitor.AgentMonitorInterface |
---|
KEY_KEYS, KEY_TYPES |
Method Summary | |
---|---|
void |
configure(AgentConfig cfg)
Configure the agent to run with new parameters. |
static AgentStorageProvider |
createStorageProvider(AgentConfig cfg)
|
void |
die()
Tell the Agent to close all connections, and die. |
AgentTransportLifecycle |
getAgentTransportLifecycle()
Retrieve the agent transport lifecycle. |
AgentConfig |
getBootConfig()
Get the bootstrap configuration that the Agent was initialized with. |
java.lang.String |
getCurrentAgentBundle()
|
double |
getJVMFreeMemory()
MONITOR METHOD: Get the JVMs free memory |
double |
getJVMTotalMemory()
MONITOR METHOD: Get the JVMs total memory |
static AgentDaemon |
getMainInstance()
|
java.lang.String[] |
getMonitors()
MONITOR METHOD: Get the monitors which are registered with the agent |
AgentMonitorValue[] |
getMonitorValues(java.lang.String monitorName,
java.lang.String[] monitorKeys)
|
double |
getNumActiveThreads()
MONITOR METHOD: Get the # of active threads |
PluginManager |
getPluginManager(java.lang.String type)
Retreive a plugin manager. |
double |
getStartTime()
MONITOR METHOD: Get the time the agent started |
AgentStorageProvider |
getStorageProvider()
Retreive the storage object in use by the Agent. |
double |
getUpTime()
MONITOR METHOD: Get the time the agent has been running |
boolean |
isRunning()
Determine if the Agent is currently running. |
static AgentDaemon |
newInstance(AgentConfig cfg)
Create a new AgentDaemon object based on a passed configuration. |
void |
registerMonitor(java.lang.String monitorName,
AgentMonitorInterface monitor)
|
void |
registerNotifyHandler(AgentNotificationHandler handler,
java.lang.String msgClass)
Register an object to be called when a notifiation of the specified message class occurs; |
void |
sendNotification(java.lang.String msgClass,
java.lang.String message)
Send a notification event to all notification handlers which have registered with the specified message class. |
void |
setConnectionListener(AgentConnectionListener newListener)
A stub API which allows handlers to set the connection listener that the agent uses. |
void |
start()
Start the Agent's listening process. |
Methods inherited from class org.hyperic.hq.agent.server.monitor.AgentMonitorSimple |
---|
getMonitorKeys, getMonitorTypes, getMonitorValues |
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 NOTIFY_AGENT_UP
public static final java.lang.String NOTIFY_AGENT_DOWN
public static final java.lang.String NOTIFY_AGENT_FAILED_START
public static final java.lang.String PROP_CERTDN
public static final java.lang.String PROP_HOSTNAME
Method Detail |
---|
public static AgentDaemon getMainInstance()
public static AgentDaemon newInstance(AgentConfig cfg) throws AgentConfigException
cfg
- Configuration the new Agent should use.
AgentConfigException
- indicating the passed configuration is
invalid.public PluginManager getPluginManager(java.lang.String type) throws AgentRunningException, PluginException
type
- The type of plugin manager that is wanted
AgentRunningException
- Indicating the agent was not running
when the request was made.
PluginException
- If the requested manager was not found.public AgentStorageProvider getStorageProvider() throws AgentRunningException
AgentRunningException
- indicating the Agent was not running
when the request was made.public AgentConfig getBootConfig()
public java.lang.String getCurrentAgentBundle()
public AgentTransportLifecycle getAgentTransportLifecycle() throws AgentRunningException
AgentRunningException
- indicating the Agent was not running
when the request was made.public void registerNotifyHandler(AgentNotificationHandler handler, java.lang.String msgClass)
handler
- Handler to call to process the notification messagemsgClass
- Message class to register withpublic void sendNotification(java.lang.String msgClass, java.lang.String message)
msgClass
- Message class that the message belongs tomessage
- Message to sendpublic static AgentStorageProvider createStorageProvider(AgentConfig cfg) throws AgentConfigException
AgentConfigException
public void configure(AgentConfig cfg) throws AgentRunningException, AgentConfigException
cfg
- Configuration to use to configure the Agent
AgentRunningException
- indicating the Agent was running when a
reconfiguration was attempted.
AgentConfigException
- indicating the configuration was invalid.public java.lang.String[] getMonitors() throws AgentMonitorException
AgentMonitorException
public double getStartTime() throws AgentMonitorException
AgentMonitorException
public double getUpTime() throws AgentMonitorException
AgentMonitorException
public double getJVMTotalMemory() throws AgentMonitorException
AgentMonitorException
public double getJVMFreeMemory() throws AgentMonitorException
AgentMonitorException
public double getNumActiveThreads() throws AgentMonitorException
AgentMonitorException
public void registerMonitor(java.lang.String monitorName, AgentMonitorInterface monitor)
public AgentMonitorValue[] getMonitorValues(java.lang.String monitorName, java.lang.String[] monitorKeys)
public boolean isRunning()
public void die() throws AgentRunningException
AgentRunningException
- indicating the Agent was not running
when die() was called.public void setConnectionListener(AgentConnectionListener newListener) throws AgentRunningException
AgentRunningException
public void start() throws AgentStartException
AgentStartException
- indicating the Agent was unable to start,
or one of the plugins failed to start.
|
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 |