Class JMX

java.lang.Object
com.github.fungal.api.util.JMX

public class JMX extends Object
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 Details

    • createMBean

      public static DynamicMBean createMBean(Object obj) throws SecurityException
      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

      public static DynamicMBean createMBean(Object obj, String description) throws SecurityException
      Create a MBean representation for the object argument
      Parameters:
      obj - The object
      description - 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 object
      description - The description for the object
      writeableAttributes - 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 SecurityException
      Create a MBean representation for the object argument
      Parameters:
      obj - The object
      description - The description for the object
      writeableAttributes - The set of attributes that are writeable specified by regular expressions
      descriptions - 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 SecurityException
      Create a MBean representation for the object argument
      Parameters:
      obj - The object
      description - The description for the object
      writeableAttributes - The set of attributes that are writeable specified by regular expressions
      descriptions - Descriptions for the attributes and operations on the object
      excludeAttributes - A set of attributes specified by regular expressions that should be excluded from the management facade
      excludeOperations - 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