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 |
|---|---|
| private JMXConnectorServer | |
| private boolean | |
| public static final String | DEFAULT_SERVICE_URL
The default service URL. |
| private final Map | |
| private MBeanServerForwarder | |
| private ObjectName | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. |
| public void | destroy()
Implements org. JMXConnectorServer managed by an instance of this class.
|
| public JMXConnectorServer | getObject()
Implements org. |
| public Class | getObjectType()
Implements org. null if not known in advance.
|
| public boolean | isSingleton()
Overrides default org. |
| public void | setDaemon(boolean daemon)
Set whether any threads started for the |
| public void | setEnvironment(Properties environment)
Set the environment properties used to construct the |
| public void | setEnvironmentMap(Map<String, ?> environment)
Set the environment properties used to construct the |
| public void | setForwarder(MBeanServerForwarder forwarder)
Set an MBeanServerForwarder to be applied to the |
| public void | setObjectName(Object objectName)
Set the |
| public void | |
| public void | setThreaded(boolean threaded)
Set whether the |
| connectorServer | back to summary |
|---|---|
| private JMXConnectorServer connectorServer
| |
| daemon | back to summary |
|---|---|
| private boolean daemon | |
| DEFAULT_SERVICE_URL | back to summary |
|---|---|
| public static final String DEFAULT_SERVICE_URL The default service URL. | |
| environment | back to summary |
|---|---|
| private final Map<String, Object> environment | |
| forwarder | back to summary |
|---|---|
| private MBeanServerForwarder forwarder
| |
| objectName | back to summary |
|---|---|
| private ObjectName objectName
| |
| serviceUrl | back to summary |
|---|---|
| private String serviceUrl | |
| threaded | back to summary |
|---|---|
| private boolean threaded | |
| ConnectorServerFactoryBean | back to summary |
|---|---|
| public ConnectorServerFactoryBean() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws JMException, IOException Implements org. Start the connector server. If the
| |
| destroy | back to summary |
|---|---|
| public void destroy() throws IOException Implements org. Stop the
| |
| getObject | back to summary |
|---|---|
| public JMXConnectorServer getObject() Implements org. Doc from org. Return an instance (possibly shared or independent) of the object managed by this factory. As with a If this FactoryBean is not fully initialized yet at the time of
the call (for example because it is involved in a circular reference),
throw a corresponding As of Spring 2.0, FactoryBeans are allowed to return
| |
| getObjectType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Return the type of object that this FactoryBean creates,
or This allows one to check for specific types of beans without instantiating objects, for example on autowiring. In the case of implementations that are creating a singleton object, this method should try to avoid singleton creation as far as possible; it should rather estimate the type in advance. For prototypes, returning a meaningful type here is advisable too. This method can be called before this FactoryBean has been fully initialized. It must not rely on state created during initialization; of course, it can still use such state if available. Note Autowiring will simply ignore FactoryBeans that return
| |
| isSingleton | back to summary |
|---|---|
| public boolean isSingleton() Overrides default org. Doc from org. Is the object managed by this factory a singleton? That is,
will Note If a FactoryBean indicates to hold a singleton object,
the object returned from The singleton status of the FactoryBean itself will generally be provided by the owning BeanFactory; usually, it has to be defined as singleton there. Note This method returning The default implementation returns
| |
| setDaemon | back to summary |
|---|---|
| public void setDaemon(boolean daemon) Set whether any threads started for the | |
| setEnvironment | back to summary |
|---|---|
| public void setEnvironment(Properties environment) Set the environment properties used to construct the | |
| setEnvironmentMap | back to summary |
|---|---|
| public void setEnvironmentMap(Map<String, ?> environment) Set the environment properties used to construct the | |
| setForwarder | back to summary |
|---|---|
| public void setForwarder(MBeanServerForwarder forwarder) Set an MBeanServerForwarder to be applied to the | |
| setObjectName | back to summary |
|---|---|
| public void setObjectName(Object objectName) throws MalformedObjectNameException Set the
| |
| setServiceUrl | back to summary |
|---|---|
| public void setServiceUrl(String serviceUrl) Set the service URL for the | |
| setThreaded | back to summary |
|---|---|
| public void setThreaded(boolean threaded) Set whether the | |