类 NotificationListenerRegistrar
- java.lang.Object
- org.springframework.jmx.support.NotificationListenerHolder
- org.springframework.jmx.access.NotificationListenerRegistrar
- 所有已实现的接口:
DisposableBean
,InitializingBean
public class NotificationListenerRegistrar extends NotificationListenerHolder implements InitializingBean, DisposableBean
Registrar object that associates a specificNotificationListener
with one or more MBeans in anMBeanServer
(typically via aMBeanServerConnection
).
字段概要
从类继承的字段 org.springframework.jmx.support.NotificationListenerHolder
mappedObjectNames
构造器概要
构造器 构造器 说明 NotificationListenerRegistrar()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.void
destroy()
Unregisters the specifiedNotificationListener
.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 specifiedNotificationListener
.void
setAgentId(String agentId)
Set the agent id of theMBeanServer
to locate.void
setEnvironment(Map<String,?> environment)
Specify the environment for the JMX connector.void
setServer(MBeanServerConnection server)
Set theMBeanServerConnection
used to connect to the MBean which all invocations are routed to.void
setServiceUrl(String url)
Set the service URL of the remoteMBeanServer
.从类继承的方法 org.springframework.jmx.support.NotificationListenerHolder
equals, getHandback, getNotificationFilter, getNotificationListener, getResolvedObjectNames, hashCode, setHandback, setMappedObjectName, setMappedObjectNames, setNotificationFilter, setNotificationListener
构造器详细资料
NotificationListenerRegistrar
public NotificationListenerRegistrar()
方法详细资料
setServer
public void setServer(MBeanServerConnection server)
Set theMBeanServerConnection
used to connect to the MBean which all invocations are routed to.
setEnvironment
public void setEnvironment(Map<String,?> environment)
Specify the environment for the JMX connector.
getEnvironment
public Map<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(String url) throws MalformedURLException
Set the service URL of the remoteMBeanServer
.
setAgentId
public void setAgentId(String agentId)
Set the agent id of theMBeanServer
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.
afterPropertiesSet
public void afterPropertiesSet()
从接口复制的说明:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,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.
- 指定者:
afterPropertiesSet
在接口中InitializingBean
prepare
public void prepare()
Registers the specifiedNotificationListener
.Ensures that an
MBeanServerConnection
is configured and attempts to detect a local connection if one is not supplied.
destroy
public void destroy()
Unregisters the specifiedNotificationListener
.- 指定者:
destroy
在接口中DisposableBean