org.apache.camel.management
Class MBeanInfoAssembler

java.lang.Object
  extended by org.apache.camel.management.MBeanInfoAssembler
All Implemented Interfaces:
Service

public class MBeanInfoAssembler
extends Object
implements Service

A Camel specific MBeanInfo assembler that reads the details from the ManagedResource, ManagedAttribute, ManagedOperation, ManagedNotification, and ManagedNotifications annotations.


Constructor Summary
MBeanInfoAssembler(CamelContext camelContext)
           
 
Method Summary
 ModelMBeanInfo getMBeanInfo(Object defaultManagedBean, Object customManagedBean, String objectName)
          Gets the ModelMBeanInfo for the given managed bean
 void start()
          Starts the service
 void stop()
          Stops the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanInfoAssembler

public MBeanInfoAssembler(CamelContext camelContext)
Method Detail

start

public void start()
           throws Exception
Description copied from interface: Service
Starts the service

Specified by:
start in interface Service
Throws:
Exception - is thrown if starting failed

stop

public void stop()
          throws Exception
Description copied from interface: Service
Stops the service

Specified by:
stop in interface Service
Throws:
Exception - is thrown if stopping failed

getMBeanInfo

public ModelMBeanInfo getMBeanInfo(Object defaultManagedBean,
                                   Object customManagedBean,
                                   String objectName)
                            throws JMException
Gets the ModelMBeanInfo for the given managed bean

Parameters:
defaultManagedBean - the default managed bean
customManagedBean - an optional custom managed bean
objectName - the object name
Returns:
the model info, or null if not possible to create, for example due the managed bean is a proxy class
Throws:
JMException - is thrown if error creating the model info


Apache Camel