Package com.github.fungal.api.util
Class JMX
java.lang.Object
com.github.fungal.api.util.JMX
This class will create a MBean representation of any POJO object.
The various methods allows the developer to filter attributes and operations
from the generated dynamic management view.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DynamicMBeancreateMBean(Object obj) Create a MBean representation for the object argumentstatic DynamicMBeancreateMBean(Object obj, String description) Create a MBean representation for the object argumentstatic DynamicMBeancreateMBean(Object obj, String description, Set<String> writeableAttributes) Create a MBean representation for the object argumentstatic DynamicMBeancreateMBean(Object obj, String description, Set<String> writeableAttributes, Map<String, String> descriptions) Create a MBean representation for the object argumentstatic DynamicMBeancreateMBean(Object obj, String description, Set<String> writeableAttributes, Map<String, String> descriptions, Set<String> excludeAttributes, Set<String> excludeOperations) Create a MBean representation for the object argument
-
Method Details
-
createMBean
Create a MBean representation for the object argument- Parameters:
obj- The object- Returns:
- The management facade for the object
- Throws:
SecurityException- Thrown if there isn't sufficient permissions
-
createMBean
Create a MBean representation for the object argument- Parameters:
obj- The objectdescription- The description for the object- Returns:
- The management facade for the object
- Throws:
SecurityException- Thrown if there isn't sufficient permissions
-
createMBean
public static DynamicMBean createMBean(Object obj, String description, Set<String> writeableAttributes) throws SecurityException Create a MBean representation for the object argument- Parameters:
obj- The objectdescription- The description for the objectwriteableAttributes- The set of attributes that are writeable specified by regular expressions- Returns:
- The management facade for the object
- Throws:
SecurityException- Thrown if there isn't sufficient permissions
-
createMBean
public static DynamicMBean createMBean(Object obj, String description, Set<String> writeableAttributes, Map<String, String> descriptions) throws SecurityExceptionCreate a MBean representation for the object argument- Parameters:
obj- The objectdescription- The description for the objectwriteableAttributes- The set of attributes that are writeable specified by regular expressionsdescriptions- Descriptions for the attributes and operations on the object- Returns:
- The management facade for the object
- Throws:
SecurityException- Thrown if there isn't sufficient permissions
-
createMBean
public static DynamicMBean createMBean(Object obj, String description, Set<String> writeableAttributes, Map<String, String> descriptions, Set<String> excludeAttributes, Set<String> excludeOperations) throws SecurityExceptionCreate a MBean representation for the object argument- Parameters:
obj- The objectdescription- The description for the objectwriteableAttributes- The set of attributes that are writeable specified by regular expressionsdescriptions- Descriptions for the attributes and operations on the objectexcludeAttributes- A set of attributes specified by regular expressions that should be excluded from the management facadeexcludeOperations- A set of operations specified by regular expressions that should be excluded from the management facade- Returns:
- The management facade for the object
- Throws:
SecurityException- Thrown if there isn't sufficient permissions
-