Class MBeanInvocationHandler

java.lang.Object
org.jppf.management.MBeanInvocationHandler
All Implemented Interfaces:
InvocationHandler

public class MBeanInvocationHandler extends Object implements InvocationHandler
An invocation handler used by MBean proxies created by JPPF.
Author:
Laurent Cohen
  • Constructor Details

    • MBeanInvocationHandler

      public MBeanInvocationHandler(MBeanServerConnection mbsc, ObjectName objectName)
      Initialize with the specified MBean connection and MBean object name.
      Parameters:
      mbsc - the MBean server connection..
      objectName - the object name of the MBean to proxy.
  • Method Details

    • invoke

      public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
      Specified by:
      invoke in interface InvocationHandler
      Throws:
      Throwable
    • newMBeanProxy

      public static <T> T newMBeanProxy(Class<T> inf, MBeanServerConnection mbsc, ObjectName objectName)
      Create a new proxy instance for the specified MBean.
      Type Parameters:
      T - the type of the proxy interface.
      Parameters:
      inf - the class of the MBean's infterface.
      mbsc - the MBean server connection.
      objectName - the object name of the MBean to proxy.
      Returns:
      a proxy of the same type as the provided interface.