@MXBean public interface IAgentMBeanAdapter
| Modifier and Type | Method and Description |
|---|---|
String |
getComponentId()
Returns id of the agent - unique across the JVMs.
|
String |
getName()
Returns human readable name.
|
ObjectName |
getObjectName(String domain)
Returns JMX object name of the MBean.
|
IAgentState |
getState()
Returns the state of the agent (whether it's running / dead / etc.).
|
void |
kill()
Stops the agent (unconditionally), closing whatever connection it may have, this
method must be non-blocking + interrupting all the communication, logic or whatever
threads the agent may have.
|
void |
pause()
This should pause the the agent.
|
void |
resume()
This should resume the logic of the agent.
|
void |
start()
Attempt to launch the agent.
|
void |
stop()
Attempt to stop the agent, usually meaning dropping all running flags and see whether
it will stop automatically.
|
ObjectName getObjectName(String domain) throws MalformedObjectNameException
domain - jmx domainMalformedObjectNameExceptionString getComponentId()
String getName()
IAgentState getState()
Note that the type AgentState wraps two things:
void start()
throws AgentException
AgentExceptionvoid pause()
throws AgentException
AgentExceptionvoid resume()
throws AgentException
AgentExceptionvoid stop()
throws AgentException
If the stop can not complete - it must automatically call kill() method.
AgentExceptionvoid kill()
After calling kill() method, the only method that may be called is getState() to examine state of the agent.
This also equals to "exception happened outside the agent" and "IFatalErrorEvent should be propagated inside
the agent"
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.