java.lang.Objectjavax.management.MBeanServerInvocationHandler
All Implemented Interfaces:
InvocationHandler
InvocationHandler that forwards methods in an MBean's management interface through the MBean server to the MBean.
Given an MBeanServerConnection , the ObjectName
of an MBean within that MBean server, and a Java interface
Intf
that describes the management interface of the
MBean using the patterns for a Standard MBean or an MXBean, this
class can be used to construct a proxy for the MBean. The proxy
implements the interface Intf
such that all of its
methods are forwarded through the MBean server to the MBean.
If the {@code InvocationHandler} is for an MXBean, then the parameters of
a method are converted from the type declared in the MXBean
interface into the corresponding mapped type, and the return value
is converted from the mapped type into the declared type. For
example, with the method
{@code public List
and given that the mapped type for {@code List
The method Object.toString(), Object.hashCode(), or Object.equals(Object), when invoked on a proxy using this invocation handler, is forwarded to the MBean server as a method on the proxied MBean only if it appears in one of the proxy's interfaces. For a proxy created with ObjectName, Class) JMX.newMBeanProxy or ObjectName, Class) JMX.newMXBeanProxy , this means that the method must appear in the Standard MBean or MXBean interface. Otherwise these methods have the following behavior:
1.5
- Constructor: |
---|
Invocation handler that forwards methods through an MBean server to a Standard MBean. This constructor may be called instead of relying on ObjectName, Class) JMX.newMBeanProxy , for instance if you need to supply a different ClassLoader to Proxy.newProxyInstance . This constructor is not appropriate for an MXBean. Use #MBeanServerInvocationHandler(MBeanServerConnection, ObjectName, boolean) for that. This constructor is equivalent to {@code new MBeanServerInvocationHandler(connection, objectName, false)}.
|
Invocation handler that can forward methods through an MBean server to a Standard MBean or MXBean. This constructor may be called instead of relying on ObjectName, Class) JMX.newMXBeanProxy , for instance if you need to supply a different ClassLoader to Proxy.newProxyInstance .
|
Method from javax.management.MBeanServerInvocationHandler Summary: |
---|
getMBeanServerConnection, getObjectName, invoke, isMXBean, newProxyInstance |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.management.MBeanServerInvocationHandler Detail: |
---|
The MBean server connection through which the methods of a proxy using this handler are forwarded. |
The name of the MBean within the MBean server to which methods are forwarded. |
|
If true, the proxy is for an MXBean, and appropriate mappings are applied to method parameters and return values. |
Return a proxy that implements the given interface by forwarding its methods through the given MBean server to the named MBean. As of 1.6, the methods JMX#newMBeanProxy(MBeanServerConnection, ObjectName, Class) and JMX#newMBeanProxy(MBeanServerConnection, ObjectName, Class, boolean) are preferred to this method. This method is equivalent to
Proxy.newProxyInstance |