Class MBeanRegistrationSupport

    • Method Detail

      • setServer

        public void setServer​(@Nullable
                              MBeanServer server)
        Specify the MBeanServer instance with which all beans should be registered. The MBeanExporter will attempt to locate an existing MBeanServer if none is supplied.
      • setRegistrationPolicy

        public void setRegistrationPolicy​(RegistrationPolicy registrationPolicy)
        The policy to use when attempting to register an MBean under an ObjectName that already exists.
        Parameters:
        registrationPolicy - the policy to use
        Since:
        3.2
      • unregisterBeans

        protected void unregisterBeans()
        Unregisters all beans that have been registered by an instance of this class.
      • doUnregister

        protected void doUnregister​(ObjectName objectName)
        Actually unregister the specified MBean from the server.
        Parameters:
        objectName - the suggested ObjectName for the MBean
      • onRegister

        protected void onRegister​(ObjectName objectName,
                                  Object mbean)
        Called when an MBean is registered under the given ObjectName. Allows subclasses to perform additional processing when an MBean is registered.

        The default implementation delegates to onRegister(ObjectName).

        Parameters:
        objectName - the actual ObjectName that the MBean was registered with
        mbean - the registered MBean instance
      • onRegister

        protected void onRegister​(ObjectName objectName)
        Called when an MBean is registered under the given ObjectName. Allows subclasses to perform additional processing when an MBean is registered.

        The default implementation is empty. Can be overridden in subclasses.

        Parameters:
        objectName - the actual ObjectName that the MBean was registered with
      • onUnregister

        protected void onUnregister​(ObjectName objectName)
        Called when an MBean is unregistered under the given ObjectName. Allows subclasses to perform additional processing when an MBean is unregistered.

        The default implementation is empty. Can be overridden in subclasses.

        Parameters:
        objectName - the ObjectName that the MBean was registered with