FactoryBean that creates a JMX 1.2 MBeanServerConnection
to a remote MBeanServer exposed via a JMXServerConnector.
Exposes the MBeanServer for bean references.
MBeanServerFactoryBean, ConnectorServerFactoryBean, org.springframework.jmx.access.MBeanClientInterceptor#setServer , org.springframework.jmx.access.NotificationListenerRegistrar#setServer
| Modifier and Type | Class and Description |
|---|---|
| private class | MBeanServerConnectionFactoryBean.JMXConnectorLazyInitTargetSource
Lazily creates a |
| private class | MBeanServerConnectionFactoryBean.MBeanServerConnectionLazyInitTargetSource
Lazily creates an |
| Modifier and Type | Field and Description |
|---|---|
| private ClassLoader | |
| private MBeanServerConnection | |
| private boolean | |
| private JMXConnector | |
| private MBeanServerConnectionFactoryBean. | |
| private final Map | |
| private JMXServiceURL |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. JMXConnector for the given settings
and exposes the associated MBeanServerConnection.
|
| private void | connect()
Connects to the remote |
| private void | |
| public void | destroy()
Implements org. JMXConnector.
|
| public MBeanServerConnection | getObject()
Implements org. |
| public Class | getObjectType()
Implements org. null if not known in advance.
|
| public boolean | isSingleton()
Overrides default org. |
| public void | setBeanClassLoader(ClassLoader
the owning class loader classLoader)Implements org. class loader to
a bean instance.
|
| public void | |
| 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 |
| beanClassLoader | back to summary |
|---|---|
| private ClassLoader beanClassLoader
| |
| connection | back to summary |
|---|---|
| private MBeanServerConnection connection
| |
| connectOnStartup | back to summary |
|---|---|
| private boolean connectOnStartup | |
| connector | back to summary |
|---|---|
| private JMXConnector connector
| |
| connectorTargetSource | back to summary |
|---|---|
| private MBeanServerConnectionFactoryBean. | |
| environment | back to summary |
|---|---|
| private final Map<String, Object> environment | |
| serviceUrl | back to summary |
|---|---|
| private JMXServiceURL serviceUrl
| |
| MBeanServerConnectionFactoryBean | back to summary |
|---|---|
| public MBeanServerConnectionFactoryBean() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws IOException Implements org. Creates a
| |
| connect | back to summary |
|---|---|
| private void connect() throws IOException Connects to the remote | |
| createLazyConnection | back to summary |
|---|---|
| private void createLazyConnection() Creates lazy proxies for the | |
| destroy | back to summary |
|---|---|
| public void destroy() throws IOException Implements org. Closes the underlying
| |
| getObject | back to summary |
|---|---|
| public MBeanServerConnection 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
| |
| setBeanClassLoader | back to summary |
|---|---|
| public void setBeanClassLoader(ClassLoader classLoader) Implements org. Doc from org. Callback that supplies the bean Invoked after the population of normal bean properties but
before an initialization callback such as
| |
| setConnectOnStartup | back to summary |
|---|---|
| public void setConnectOnStartup(boolean connectOnStartup) Set whether to connect to the server on startup. Default is Can be turned off to allow for late start of the JMX server. In this case, the JMX connector will be fetched on first access. | |
| 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 | |
| setServiceUrl | back to summary |
|---|---|
| public void setServiceUrl(String url) throws MalformedURLException Set the service URL of the remote | |
JMXConnector using the configured service URL
and environment properties.
MBeanServerConnectionFactoryBean#setServiceUrl(String), MBeanServerConnectionFactoryBean#setEnvironment(java.util.Properties)
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | createObject()
Implements abstract org. |
| public Class | getTargetClass()
Overrides org. Implements org. null if the
target is null (it is hasn't yet been initialized),
or the target class if the target has already been initialized.
|
| JMXConnectorLazyInitTargetSource | back to summary |
|---|---|
| private JMXConnectorLazyInitTargetSource() | |
| createObject | back to summary |
|---|---|
| protected Object createObject() throws Exception Implements abstract org. Doc from org. Subclasses should implement this method to return the lazy initialized object. Called the first time the proxy is invoked. | |
| getTargetClass | back to summary |
|---|---|
| public Class Overrides org. Implements org. Doc from org. This default implementation returns Subclasses may wish to override this method in order to provide
a meaningful value when the target is still
| |
MBeanServerConnection.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | createObject()
Implements abstract org. |
| public Class | getTargetClass()
Overrides org. Implements org. null if the
target is null (it is hasn't yet been initialized),
or the target class if the target has already been initialized.
|
| MBeanServerConnectionLazyInitTargetSource | back to summary |
|---|---|
| private MBeanServerConnectionLazyInitTargetSource() | |
| createObject | back to summary |
|---|---|
| protected Object createObject() throws Exception Implements abstract org. Doc from org. Subclasses should implement this method to return the lazy initialized object. Called the first time the proxy is invoked. | |
| getTargetClass | back to summary |
|---|---|
| public Class Overrides org. Implements org. Doc from org. This default implementation returns Subclasses may wish to override this method in order to provide
a meaningful value when the target is still
| |