Class ContextHandlerMBean

All Implemented Interfaces:
DynamicMBean

@ManagedObject("ContextHandler mbean wrapper") public class ContextHandlerMBean extends AbstractHandlerMBean
  • Constructor Details

    • ContextHandlerMBean

      public ContextHandlerMBean(Object managedObject)
  • Method Details

    • getManagedObject

      public ContextHandler getManagedObject()
      Description copied from class: ObjectMBean
      Get the managed object.
      Overrides:
      getManagedObject in class AbstractHandlerMBean
      Returns:
      the managed object
    • getObjectNameBasis

      public String getObjectNameBasis()
      Description copied from class: ObjectMBean

      Allows to customize the ObjectName property name.

      Certain components have a natural name and returning it from this method allows it to be part of the ObjectName.

      Overrides:
      getObjectNameBasis in class ObjectMBean
      Returns:
      a custom value for the property name
    • getObjectContextBasis

      public String getObjectContextBasis()
      Description copied from class: ObjectMBean

      Allows to customize the ObjectName property context.

      When MBeanContainer creates default ObjectNames, the context property is "inherited" recursively by MBeans that are children of this MBean; this allows to "group" descendant MBeans so that it is clear who is the ancestor they belong to.

      For example, if object A has a child component B which has children components C, then AMBean can override this method to return "alpha", and then the ObjectNames will be:

      • domain:type=a,context=alpha,id=0
      • domain:type=b,context=alpha,id=0
      • domain:type=c,context=alpha,id=0
      • domain:type=c,context=alpha,id=1
      Overrides:
      getObjectContextBasis in class ObjectMBean
      Returns:
      a custom value for the property context
    • getContextAttributes

      @ManagedAttribute("Map of context attributes") public Map<String,String> getContextAttributes()
    • setContextAttribute

      @ManagedOperation(value="Set context attribute", impact="ACTION") public void setContextAttribute(@Name(value="name",description="attribute name") String name, @Name(value="value",description="attribute value") Object value)
    • setContextAttribute

      @ManagedOperation(value="Set context attribute", impact="ACTION") public void setContextAttribute(@Name(value="name",description="attribute name") String name, @Name(value="value",description="attribute value") String value)
    • removeContextAttribute

      @ManagedOperation(value="Remove context attribute", impact="ACTION") public void removeContextAttribute(@Name(value="name",description="attribute name") String name)