org.springframework.jmx.access

Class NotificationListenerRegistrar

    • Field Detail

      • logger

        protected final Log logger
        Logger available to subclasses.
    • Constructor Detail

      • NotificationListenerRegistrar

        public NotificationListenerRegistrar()
    • Method Detail

      • setServer

        public void setServer(javax.management.MBeanServerConnection server)
        Set the MBeanServerConnection used to connect to the MBean which all invocations are routed to.
      • setEnvironment

        public void setEnvironment(@Nullable
                                   java.util.Map<java.lang.String,?> environment)
        Specify the environment for the JMX connector.
        See Also:
        JMXConnectorFactory.connect(javax.management.remote.JMXServiceURL, java.util.Map)
      • getEnvironment

        @Nullable
        public java.util.Map<java.lang.String,?> getEnvironment()
        Allow Map access to the environment to be set for the connector, with the option to add or override specific entries.

        Useful for specifying entries directly, for example via "environment[myKey]". This is particularly useful for adding or overriding entries in child bean definitions.

      • setServiceUrl

        public void setServiceUrl(java.lang.String url)
                           throws java.net.MalformedURLException
        Set the service URL of the remote MBeanServer.
        Throws:
        java.net.MalformedURLException
      • setAgentId

        public void setAgentId(java.lang.String agentId)
        Set the agent id of the MBeanServer to locate.

        Default is none. If specified, this will result in an attempt being made to locate the attendant MBeanServer, unless the "serviceUrl" property has been set.

        See Also:

        Specifying the empty String indicates the platform MBeanServer.

      • afterPropertiesSet

        public void afterPropertiesSet()
        Description copied from interface: InitializingBean
        Invoked by the containing BeanFactory after it has set all bean properties and satisfied BeanFactoryAware, ApplicationContextAware etc.

        This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.

        Specified by:
        afterPropertiesSet in interface InitializingBean
      • prepare

        public void prepare()
        Registers the specified NotificationListener.

        Ensures that an MBeanServerConnection is configured and attempts to detect a local connection if one is not supplied.

      • destroy

        public void destroy()
        Unregisters the specified NotificationListener.
        Specified by:
        destroy in interface DisposableBean