public class ConnectorServerFactoryBean extends MBeanRegistrationSupport implements org.springframework.beans.factory.FactoryBean<JMXConnectorServer>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.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.
JMXConnectorServer, 
MBeanServer| Modifier and Type | Field and Description | 
|---|---|
| static String | DEFAULT_SERVICE_URLThe default service URL. | 
logger, server| Constructor and Description | 
|---|
| ConnectorServerFactoryBean() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet()Start the connector server. | 
| void | destroy()Stop the  JMXConnectorServermanaged by an instance of this class. | 
| JMXConnectorServer | getObject() | 
| Class<? extends JMXConnectorServer> | getObjectType() | 
| boolean | isSingleton() | 
| void | setDaemon(boolean daemon)Set whether any threads started for the  JMXConnectorServershould be
 started as daemon threads. | 
| void | setEnvironment(Properties environment)Set the environment properties used to construct the  JMXConnectorServerasjava.util.Properties(String key/value pairs). | 
| void | setEnvironmentMap(Map<String,?> environment)Set the environment properties used to construct the  JMXConnectoras aMapof String keys and arbitrary Object values. | 
| void | setForwarder(MBeanServerForwarder forwarder)Set an MBeanServerForwarder to be applied to the  JMXConnectorServer. | 
| void | setObjectName(Object objectName)Set the  ObjectNameused to register theJMXConnectorServeritself with theMBeanServer, asObjectNameinstance
 or asString. | 
| void | setServiceUrl(String serviceUrl)Set the service URL for the  JMXConnectorServer. | 
| void | setThreaded(boolean threaded)Set whether the  JMXConnectorServershould be started in a separate thread. | 
doRegister, doUnregister, getRegisteredObjectNames, getServer, onRegister, onRegister, onUnregister, setRegistrationPolicy, setServer, unregisterBeanspublic static final String DEFAULT_SERVICE_URL
public void setServiceUrl(String serviceUrl)
JMXConnectorServer.public void setEnvironment(@Nullable
                           Properties environment)
JMXConnectorServer
 as java.util.Properties (String key/value pairs).public void setEnvironmentMap(@Nullable
                              Map<String,?> environment)
JMXConnector
 as a Map of String keys and arbitrary Object values.public void setForwarder(MBeanServerForwarder forwarder)
JMXConnectorServer.public void setObjectName(Object objectName) throws MalformedObjectNameException
ObjectName used to register the JMXConnectorServer
 itself with the MBeanServer, as ObjectName instance
 or as String.MalformedObjectNameException - if the ObjectName is malformedpublic void setThreaded(boolean threaded)
JMXConnectorServer should be started in a separate thread.public void setDaemon(boolean daemon)
JMXConnectorServer should be
 started as daemon threads.public void afterPropertiesSet()
                        throws JMException,
                               IOException
threaded flag is set to true,
 the JMXConnectorServer will be started in a separate thread.
 If the daemon flag is set to true, that thread will be
 started as a daemon thread.afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanJMException - if a problem occurred when registering the connector server
 with the MBeanServerIOException - if there is a problem starting the connector server@Nullable public JMXConnectorServer getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<JMXConnectorServer>public Class<? extends JMXConnectorServer> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<JMXConnectorServer>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<JMXConnectorServer>public void destroy()
             throws IOException
JMXConnectorServer managed by an instance of this class.
 Automatically called on ApplicationContext shutdown.destroy in interface org.springframework.beans.factory.DisposableBeanIOException - if there is an error stopping the connector server