类 ConnectorServerFactoryBean
java.lang.Object
cn.taketoday.jmx.support.MBeanRegistrationSupport
cn.taketoday.jmx.support.ConnectorServerFactoryBean
- 所有已实现的接口:
DisposableBean,FactoryBean<JMXConnectorServer>,InitializingBean
public class ConnectorServerFactoryBean
extends MBeanRegistrationSupport
implements FactoryBean<JMXConnectorServer>, InitializingBean, DisposableBean
FactoryBean that creates a JSR-160 JMXConnectorServer,
optionally registers it with the MBeanServer, and then starts it.
The JMXConnectorServer can be started in a separate thread by setting the
threaded property to true. You can configure this thread to be a
daemon thread by setting the daemon property to true.
The JMXConnectorServer is correctly shut down when an instance of this
class is destroyed on shutdown of the containing ApplicationContext.
- 从以下版本开始:
- 4.0
- 作者:
- Rob Harrop, Juergen Hoeller
- 另请参阅:
-
字段概要
字段从类继承的字段 cn.taketoday.jmx.support.MBeanRegistrationSupport
log, server从接口继承的字段 cn.taketoday.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidStart the connector server.voiddestroy()Stop theJMXConnectorServermanaged by an instance of this class.Class<? extends JMXConnectorServer>booleanvoidsetDaemon(boolean daemon) Set whether any threads started for theJMXConnectorServershould be started as daemon threads.voidsetEnvironment(Properties environment) Set the environment properties used to construct theJMXConnectorServerasjava.util.Properties(String key/value pairs).voidsetEnvironmentMap(Map<String, ?> environment) Set the environment properties used to construct theJMXConnectoras aMapof String keys and arbitrary Object values.voidsetForwarder(MBeanServerForwarder forwarder) Set an MBeanServerForwarder to be applied to theJMXConnectorServer.voidsetObjectName(Object objectName) Set theObjectNameused to register theJMXConnectorServeritself with theMBeanServer, asObjectNameinstance or asString.voidsetServiceUrl(String serviceUrl) Set the service URL for theJMXConnectorServer.voidsetThreaded(boolean threaded) Set whether theJMXConnectorServershould be started in a separate thread.从类继承的方法 cn.taketoday.jmx.support.MBeanRegistrationSupport
doRegister, doUnregister, getRegisteredObjectNames, getServer, onRegister, onRegister, onUnregister, setRegistrationPolicy, setServer, unregisterBeans
-
字段详细资料
-
DEFAULT_SERVICE_URL
The default service URL.- 另请参阅:
-
-
构造器详细资料
-
ConnectorServerFactoryBean
public ConnectorServerFactoryBean()
-
-
方法详细资料
-
setServiceUrl
Set the service URL for theJMXConnectorServer. -
setEnvironment
Set the environment properties used to construct theJMXConnectorServerasjava.util.Properties(String key/value pairs). -
setEnvironmentMap
Set the environment properties used to construct theJMXConnectoras aMapof String keys and arbitrary Object values. -
setForwarder
Set an MBeanServerForwarder to be applied to theJMXConnectorServer. -
setObjectName
Set theObjectNameused to register theJMXConnectorServeritself with theMBeanServer, asObjectNameinstance or asString.- 抛出:
MalformedObjectNameException- if theObjectNameis malformed
-
setThreaded
public void setThreaded(boolean threaded) Set whether theJMXConnectorServershould be started in a separate thread. -
setDaemon
public void setDaemon(boolean daemon) Set whether any threads started for theJMXConnectorServershould be started as daemon threads. -
afterPropertiesSet
Start the connector server. If thethreadedflag is set totrue, theJMXConnectorServerwill be started in a separate thread. If thedaemonflag is set totrue, that thread will be started as a daemon thread.- 指定者:
afterPropertiesSet在接口中InitializingBean- 抛出:
JMException- if a problem occurred when registering the connector server with theMBeanServerIOException- if there is a problem starting the connector server
-
getObject
- 指定者:
getObject在接口中FactoryBean<JMXConnectorServer>
-
getObjectType
- 指定者:
getObjectType在接口中FactoryBean<JMXConnectorServer>
-
isSingleton
public boolean isSingleton()- 指定者:
isSingleton在接口中FactoryBean<JMXConnectorServer>
-
destroy
Stop theJMXConnectorServermanaged by an instance of this class. Automatically called onApplicationContextshutdown.- 指定者:
destroy在接口中DisposableBean- 抛出:
IOException- if there is an error stopping the connector server
-