View Javadoc

1   package cz.cuni.amis.pogamut.base.agent.jmx;
2   
3   import javax.management.MBeanServer;
4   import javax.management.ObjectName;
5   
6   import cz.cuni.amis.pogamut.base.agent.exceptions.CantStartJMXException;
7   import cz.cuni.amis.pogamut.base.agent.exceptions.JMXAlreadyEnabledException;
8   
9   /**
10   * Interface for enabling JMX on some feature.
11   * <p><p>
12   * This interface is marking that class supports JMX somehow and can be added to the agent who
13   * will call this method whenever this method is called on the whole agent.
14   * 
15   * @author Jimmy
16   */
17  public interface IJMXEnabled {
18  	
19  	/**
20  	 * Method for starting the JMX extension of the class. 
21  	 * <p><p>
22  	 * Object should register whatever objects it wants to expose via JMX.
23  	 * 
24  	 * @param mBeanServer server where the MBean of agent is registered
25  	 * @param parent parent's ObjectName, should be used as base of name of 
26       * the registered MBean
27       * @throws JMXAlreadyEnabledException
28  	 */
29  	public void enableJMX(MBeanServer mBeanServer, ObjectName parent) throws JMXAlreadyEnabledException, CantStartJMXException;
30  	
31  }