Class MBeanHub

java.lang.Object
com.zfabrik.management.MBeanHub

public class MBeanHub extends Object
A convenient place to manage MBeans for resources that may be subject to garbage collection. Any call to reregister will first unregister all Mbeans that depended on a collected resource. Register an mbean specifying the dependency resource.
  • Constructor Details

    • MBeanHub

      public MBeanHub()
  • Method Details

    • registerMBean

      public static ObjectInstance registerMBean(IResourceHandle dependency, Object mbean, ObjectName name) throws JMException
      Register an mbean specifying the dependency resource. If the dependency gets collected, eventually the mbean will be unregistered. If an mbean for the given name was registered before, it will be unregistered before the new mbean gets registered.
      Parameters:
      dependency -
      mbean -
      name -
      Returns:
      Throws:
      JMException