| java.lang.Object | |
| ↳ | org.springframework.jmx.access.MBeanClientInterceptor | 
   Known Direct Subclasses
  
 | 
org.aopalliance.intercept.MethodInterceptor that routes calls to an
 MBean running on the supplied MBeanServerConnection.
 Works for both local and remote MBeanServerConnections.
 
By default, the MBeanClientInterceptor will connect to the
 MBeanServer and cache MBean metadata at startup. This can
 be undesirable when running against a remote MBeanServer
 that may not be running when the application starts. Through setting the
 connectOnStartup property to "false",
 you can defer this process until the first invocation against the proxy.
 
This functionality is usually used through MBeanProxyFactoryBean.
 See the javadoc of that class for more information.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| logger | Logger available to subclasses | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Prepares the  
  
  MBeanServerConnection if the "connectOnStartup"
 is turned on (which it is by default). | |||||||||||
Invoked by a BeanFactory on destruction of a singleton. 
  
   | |||||||||||
Allow Map access to the environment to be set for the connector,
 with the option to add or override specific entries. 
  
   | |||||||||||
Route the invocation to the configured managed resource.. 
  
   | |||||||||||
Ensures that an  
  
  MBeanServerConnection is configured and attempts
 to detect a local connection if one is not supplied. | |||||||||||
Set the agent id of the  
  
  MBeanServer to locate. | |||||||||||
Callback that supplies the bean  
  
  class loader to
 a bean instance. | |||||||||||
Set whether or not the proxy should connect to the  
  
  MBeanServer
 at creation time ("true") or the first time it is invoked ("false"). | |||||||||||
Specify the environment for the JMX connector. 
  
   | |||||||||||
Set the management interface of the target MBean, exposing bean property
 setters and getters for MBean attributes and conventional Java methods
 for MBean operations. 
  
   | |||||||||||
Set the  
  
  ObjectName of the MBean which calls are routed to,
 as ObjectName instance or as String. | |||||||||||
Set whether to refresh the MBeanServer connection on connect failure. 
  
   | |||||||||||
Set the  
  
  MBeanServerConnection used to connect to the
 MBean which all invocations are routed to. | |||||||||||
Set the service URL of the remote  
  
  MBeanServer. | |||||||||||
Set whether to use strict casing for attributes. 
  
   | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Convert the given result object (from attribute access or operation invocation)
 to the specified target class for returning from the proxy method. 
  
   | |||||||||||
Route the invocation to the configured managed resource. 
  
   | |||||||||||
Return the management interface of the target MBean,
 or  
  
  null if none specified. | |||||||||||
Refresh the connection and retry the MBean invocation if possible. 
  
   | |||||||||||
Return whether this client interceptor has already been prepared,
 i.e. 
  
   | |||||||||||
| 
  [Expand]
   Inherited Methods  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   
From class
  java.lang.Object
 | |||||||||||
   
From interface
  org.springframework.beans.factory.BeanClassLoaderAware
 | |||||||||||
   
From interface
  org.springframework.beans.factory.DisposableBean
 | |||||||||||
   
From interface
  org.springframework.beans.factory.InitializingBean
 | |||||||||||
Logger available to subclasses
Prepares the MBeanServerConnection if the "connectOnStartup"
 is turned on (which it is by default).
Invoked by a BeanFactory on destruction of a singleton.
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.
Route the invocation to the configured managed resource..
| invocation | the MethodInvocation to re-route | 
        
|---|
| Throwable | an invocation error propagated to the user | 
|---|
Ensures that an MBeanServerConnection is configured and attempts
 to detect a local connection if one is not supplied.
Set the agent id of the MBeanServer 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.
Callback that supplies the bean class loader to
 a bean instance.
 
Invoked after the population of normal bean properties but
 before an initialization callback such as
 InitializingBean's
 afterPropertiesSet()
 method or a custom init-method.
| beanClassLoader | the owning class loader; may be null in
 which case a default ClassLoader must be used, for example
 the ClassLoader obtained via
 getDefaultClassLoader()
 | 
        
|---|
Set whether or not the proxy should connect to the MBeanServer
 at creation time ("true") or the first time it is invoked ("false").
 Default is "true".
Specify the environment for the JMX connector.
Set the management interface of the target MBean, exposing bean property setters and getters for MBean attributes and conventional Java methods for MBean operations.
Set the ObjectName of the MBean which calls are routed to,
 as ObjectName instance or as String.
| MalformedObjectNameException | 
|---|
Set whether to refresh the MBeanServer connection on connect failure. Default is "false".
Can be turned on to allow for hot restart of the JMX server, automatically reconnecting and retrying in case of an IOException.
Set the MBeanServerConnection used to connect to the
 MBean which all invocations are routed to.
Set the service URL of the remote MBeanServer.
| MalformedURLException | 
|---|
Set whether to use strict casing for attributes. Enabled by default.
When using strict casing, a JavaBean property with a getter such as
 getFoo() translates to an attribute called Foo.
 With strict casing disabled, getFoo() would translate to just
 foo.
Convert the given result object (from attribute access or operation invocation) to the specified target class for returning from the proxy method.
| result | the result object as returned by the MBeanServer | 
        
|---|
Route the invocation to the configured managed resource. Correctly routes JavaBean property
 access to MBeanServerConnection.get/setAttribute and method invocation to
 MBeanServerConnection.invoke.
| invocation | the MethodInvocation to re-route | 
        
|---|
| Throwable | an invocation error propagated to the user | 
|---|
Return the management interface of the target MBean,
 or null if none specified.
Refresh the connection and retry the MBean invocation if possible.
If not configured to refresh on connect failure, this method simply rethrows the original exception.
| invocation | the invocation that failed | 
|---|---|
| ex | the exception raised on remote invocation | 
| Throwable | an exception raised by the new invocation, if it failed as well | 
|---|
Return whether this client interceptor has already been prepared, i.e. has already looked up the server and cached all metadata.