Interface MBeanRegistry


  • public interface MBeanRegistry
    To avoid confusion with the existing MBeanRegistration interface from javax.management this interface is now called MBeanRegistry (although there are too many negative associations with the word "registry").
    Since:
    19.02.2009
    Version:
    $Revision: 1.6 $
    Author:
    oliver
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getMBeanName()
      Returns the MBean name under which this class was registered.
      javax.management.ObjectName getObjectName()
      Returns the MBean name under which this class was registered.
      boolean isRegisteredAsMBean()
      Was the object registered as MBean?.
      void registerAsMBean()
      Registers the MBean as "a.b.c:type=Xxx" (where "a.b.c" is the package name and "Xxx" the classname).
      void registerAsMBean​(java.lang.String name)
      Register the MBean with the given name.
      void registerAsMBean​(javax.management.ObjectName name)
      Register the MBean with the given object name.
      void unregisterAsMBean()
      Unregisters the MBean from the MBean server.
    • Method Detail

      • registerAsMBean

        void registerAsMBean()
                      throws javax.management.JMException
        Registers the MBean as "a.b.c:type=Xxx" (where "a.b.c" is the package name and "Xxx" the classname).
        Throws:
        javax.management.JMException - the JMX exception
      • registerAsMBean

        void registerAsMBean​(java.lang.String name)
                      throws javax.management.JMException
        Register the MBean with the given name.
        Parameters:
        name - e.g. "a.b.c:type=Xxx"
        Throws:
        javax.management.JMException - the JMX exception
      • registerAsMBean

        void registerAsMBean​(javax.management.ObjectName name)
                      throws javax.management.JMException
        Register the MBean with the given object name.
        Parameters:
        name - e.g. new ObjectName("a.b.c:type=Xxx");
        Throws:
        javax.management.JMException - the JMX exception
      • unregisterAsMBean

        void unregisterAsMBean()
        Unregisters the MBean from the MBean server.
      • isRegisteredAsMBean

        boolean isRegisteredAsMBean()
        Was the object registered as MBean?.
        Returns:
        true if object was registered.
      • getMBeanName

        java.lang.String getMBeanName()
        Returns the MBean name under which this class was registered.
        Returns:
        e.g. "a.b.c:type=Xxx"
      • getObjectName

        javax.management.ObjectName getObjectName()
                                           throws javax.management.MalformedObjectNameException
        Returns the MBean name under which this class was registered.
        Returns:
        e.g. "a.b.c:type=Xxx" as ObjectName
        Throws:
        javax.management.MalformedObjectNameException - the malformed object name exception