Interface ManagementMBeanAssembler
- All Superinterfaces:
AutoCloseable, Service, StaticService
Assembles a
ModelMBean from a Camel managed object so it can be registered in the
MBeanServer.
Camel's JMX layer does not require managed objects to implement a fixed MBean interface. Instead, managed facades
(such as ManagedCamelContext or ManagedRoute) are annotated with
@org.apache.camel.api.management.ManagedResource, @ManagedAttribute, and @ManagedOperation.
The assembler scans those annotations and builds a RequiredModelMBean that
exposes exactly the declared attributes and operations.
The ManagementAgent calls
assemble(javax.management.MBeanServer, Object, javax.management.ObjectName) for each managed object before
registering it. Replacing this implementation allows custom annotation processors or alternative MBean descriptors to
be used.
See JMX in the Camel user manual.- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable ModelMBeanassemble(MBeanServer mBeanServer, Object obj, ObjectName name) Assemble theModelMBean.
-
Method Details
-
assemble
@Nullable ModelMBean assemble(MBeanServer mBeanServer, Object obj, ObjectName name) throws JMException Assemble theModelMBean.- Parameters:
mBeanServer- the mbean serverobj- the objectname- the object name to use in JMX- Returns:
- the assembled
ModelMBean, or null if not possible to assemble an MBean - Throws:
JMException- is thrown if error assembling the mbean
-