cz.cuni.amis.pogamut.base.agent.module
Class JMXAgentModule<AGENT extends AbstractAgent>

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.JMXAgentModule<AGENT>
Type Parameters:
AGENT -
All Implemented Interfaces:
IJMXEnabled, IComponent

public abstract class JMXAgentModule<AGENT extends AbstractAgent>
extends AgentModule<AGENT>
implements IJMXEnabled

Agent module that provides JMX interface. Implement enableJMX(MBeanServer, ObjectName) to publish the interface.

This module automatically registers itself into AbstractAgent.getJMX().

See Also:
AgentJMXComponents, IJMXEnabled

Field Summary
 
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
agent, controller, eventBus, log
 
Constructor Summary
JMXAgentModule(AGENT agent)
          Initialize agent module - it will start ComponentDependencyType.STARTS_WITH the agent.
JMXAgentModule(AGENT agent, java.util.logging.Logger log)
          Initialize agent module - it will start ComponentDependencyType.STARTS_WITH the agent.
 
Method Summary
abstract  void enableJMX(javax.management.MBeanServer mBeanServer, javax.management.ObjectName parent)
          Register JMX components.
 
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMXAgentModule

public JMXAgentModule(AGENT agent)
Initialize agent module - it will start ComponentDependencyType.STARTS_WITH the agent.

Parameters:
agent -

JMXAgentModule

public JMXAgentModule(AGENT agent,
                      java.util.logging.Logger log)
Initialize agent module - it will start ComponentDependencyType.STARTS_WITH the agent.

Parameters:
agent -
log - should be used, if null is provided, it is created automatically
Method Detail

enableJMX

public abstract void enableJMX(javax.management.MBeanServer mBeanServer,
                               javax.management.ObjectName parent)
                        throws JMXAlreadyEnabledException,
                               CantStartJMXException
Register JMX components.

Specified by:
enableJMX in interface IJMXEnabled
Parameters:
mBeanServer - server where the MBean of agent is registered
parent - parent's ObjectName, should be used as base of name of the registered MBean
Throws:
JMXAlreadyEnabledException
CantStartJMXException