|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.jmx.access.MBeanClientInterceptor
public class MBeanClientInterceptor
MethodInterceptor implementation that routes calls to an MBean
running on the supplied MBeanServerConnection. Works for both
local and remote MBeanServerConnections.
This functionality is usually used through MBeanProxyFactoryBean.
See the javadoc of that class for more information.
MBeanProxyFactoryBean| Constructor Summary | |
|---|---|
MBeanClientInterceptor()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Ensures that an MBeanServerConnection is configured and attempts to
detect a local connection if one is not supplied. |
Object |
invoke(MethodInvocation invocation)
Route the invocation to the configured managed resource. |
void |
setObjectName(String objectName)
Set the ObjectName of the MBean which calls are
routed to. |
void |
setServer(MBeanServerConnection server)
Set the MBeanServerConnection used to connect to the
MBean which all invocations are routed to. |
void |
setServiceUrl(String url)
Set the service URL of the remote MBeanServer. |
void |
setUseStrictCasing(boolean useStrictCasing)
Set whether to use strict casing for attributes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MBeanClientInterceptor()
| Method Detail |
|---|
public void setServer(MBeanServerConnection server)
MBeanServerConnection used to connect to the
MBean which all invocations are routed to.
public void setServiceUrl(String url)
throws IOException
MBeanServer.
IOException
public void setObjectName(String objectName)
throws MalformedObjectNameException
ObjectName of the MBean which calls are
routed to.
MalformedObjectNameExceptionpublic void setUseStrictCasing(boolean useStrictCasing)
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.
public void afterPropertiesSet()
throws JMException
MBeanServerConnection is configured and attempts to
detect a local connection if one is not supplied.
afterPropertiesSet in interface InitializingBeanJMException
public Object invoke(MethodInvocation invocation)
throws Throwable
MBeanServerConnection.get/setAttribute and method invocation to
MBeanServerConnection.invoke. Any attempt to invoke a method that does not
correspond to an attribute or operation defined in the management interface of the managed
resource results in an InvalidInvocationException.
invoke in interface MethodInterceptorinvocation - the MethodInvocation to re-route.
InvocationFailureException - if the invocation does not match an attribute or
operation on the management interface of the resource.
Throwable - typically as the result of an error during invocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||