public class NotificationListenerRegistrar extends NotificationListenerHolder implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
NotificationListener
 with one or more MBeans in an MBeanServer
 (typically via a MBeanServerConnection).| Modifier and Type | Field and Description | 
|---|---|
| protected Log | loggerLogger available to subclasses. | 
mappedObjectNames| Constructor and Description | 
|---|
| NotificationListenerRegistrar() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet() | 
| void | destroy()Unregisters the specified  NotificationListener. | 
| Map<String,?> | getEnvironment()Allow Map access to the environment to be set for the connector,
 with the option to add or override specific entries. | 
| void | prepare()Registers the specified  NotificationListener. | 
| void | setAgentId(String agentId)Set the agent id of the  MBeanServerto locate. | 
| void | setEnvironment(Map<String,?> environment)Specify the environment for the JMX connector. | 
| void | setServer(MBeanServerConnection server)Set the  MBeanServerConnectionused to connect to the
 MBean which all invocations are routed to. | 
| void | setServiceUrl(String url)Set the service URL of the remote  MBeanServer. | 
equals, getHandback, getNotificationFilter, getNotificationListener, getResolvedObjectNames, hashCode, setHandback, setMappedObjectName, setMappedObjectNames, setNotificationFilter, setNotificationListenerprotected final Log logger
public void setServer(MBeanServerConnection server)
MBeanServerConnection used to connect to the
 MBean which all invocations are routed to.public void setEnvironment(@Nullable
                           Map<String,?> environment)
@Nullable public Map<String,?> getEnvironment()
Useful for specifying entries directly, for example via "environment[myKey]". This is particularly useful for adding or overriding entries in child bean definitions.
public void setServiceUrl(String url) throws MalformedURLException
MBeanServer.MalformedURLExceptionpublic void setAgentId(String agentId)
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.
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic void prepare()
NotificationListener.
 Ensures that an MBeanServerConnection is configured and attempts
 to detect a local connection if one is not supplied.
public void destroy()
NotificationListener.destroy in interface org.springframework.beans.factory.DisposableBean