javax.management
Class MBeanServerInvocationHandler

java.lang.Object
  extended byjavax.management.MBeanServerInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class MBeanServerInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

An invocation handler to proxy requests through the MBeanServer


Constructor Summary
MBeanServerInvocationHandler(MBeanServerConnection (src)  connection, ObjectName (src)  name)
          Construct an MBeanServerInvocationHandler for the given connection and object name.
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
static java.lang.Object newProxyInstance(MBeanServerConnection (src)  connection, ObjectName (src)  name, java.lang.Class interfaceClass, boolean broadcaster)
          Constructs a new Proxy for the MBean using an MBeanServerInvocationHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanServerInvocationHandler

public MBeanServerInvocationHandler(MBeanServerConnection (src)  connection,
                                    ObjectName (src)  name)
Construct an MBeanServerInvocationHandler for the given connection and object name.

Parameters:
connection - the MBeanServerConnection
name - the ObjectName of the bean
Method Detail

newProxyInstance

public static java.lang.Object newProxyInstance(MBeanServerConnection (src)  connection,
                                                ObjectName (src)  name,
                                                java.lang.Class interfaceClass,
                                                boolean broadcaster)
Constructs a new Proxy for the MBean using an MBeanServerInvocationHandler.

Parameters:
connection - the MBeanServerConnection
name - the ObjectName of the bean
interfaceClass - the interface to expose
broadcaster - pass true to expose the NotificationEmitter interface

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable