Class MixinRequiredModelMBean
- java.lang.Object
-
- javax.management.modelmbean.RequiredModelMBean
-
- org.apache.camel.support.management.MixinRequiredModelMBean
-
- All Implemented Interfaces:
DynamicMBean
,MBeanRegistration
,ModelMBean
,ModelMBeanNotificationBroadcaster
,NotificationBroadcaster
,NotificationEmitter
,PersistentMBean
public class MixinRequiredModelMBean extends RequiredModelMBean
ARequiredModelMBean
which allows us to intercept invoking operations on the MBean. This allows us to intercept calls to custom mbeans where allows us to mix-in the standard set of mbean attributes and operations that Camel provides out of the box. For example if mask has been enabled on JMX, then we use this implementation to hide sensitive information from the returned JMX attributes / operations.
-
-
Constructor Summary
Constructors Constructor Description MixinRequiredModelMBean()
MixinRequiredModelMBean(ModelMBeanInfo mbi, boolean mask, ModelMBeanInfo defaultMbi, DynamicMBean defaultObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
invoke(String opName, Object[] opArgs, String[] sig)
protected boolean
isDefaultOperation(String opName)
boolean
isMask()
protected boolean
isMaskOperation(String opName)
protected String
mask(String opName, String value)
Masks the returned value from invoking the operation-
Methods inherited from class javax.management.modelmbean.RequiredModelMBean
addAttributeChangeNotificationListener, addNotificationListener, getAttribute, getAttributes, getClassLoaderRepository, getMBeanInfo, getNotificationInfo, load, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedResource, setModelMBeanInfo, store
-
-
-
-
Constructor Detail
-
MixinRequiredModelMBean
public MixinRequiredModelMBean() throws MBeanException, RuntimeOperationsException
-
MixinRequiredModelMBean
public MixinRequiredModelMBean(ModelMBeanInfo mbi, boolean mask, ModelMBeanInfo defaultMbi, DynamicMBean defaultObject) throws MBeanException, RuntimeOperationsException
-
-
Method Detail
-
isMask
public boolean isMask()
-
invoke
public Object invoke(String opName, Object[] opArgs, String[] sig) throws MBeanException, ReflectionException
- Specified by:
invoke
in interfaceDynamicMBean
- Overrides:
invoke
in classRequiredModelMBean
- Throws:
MBeanException
ReflectionException
-
isDefaultOperation
protected boolean isDefaultOperation(String opName)
-
isMaskOperation
protected boolean isMaskOperation(String opName)
-
-