org.jboss.jmx.adaptor.rmi
Class RMIRemoteMBeanProxy

java.lang.Object
  extended byorg.jboss.jmx.adaptor.rmi.RMIRemoteMBeanProxy
All Implemented Interfaces:
java.lang.reflect.InvocationHandler, java.io.Serializable

public class RMIRemoteMBeanProxy
extends java.lang.Object
implements java.io.Serializable, java.lang.reflect.InvocationHandler

A factory for producing MBean proxies that run on a distant node and access the server through RMI. Most of the code comes from MBeanProxy.

See Also:
Serialized Form

Method Summary
static java.lang.Object create(java.lang.Class intf, ObjectName (src)  name, MBeanServer (src)  server)
          Create an MBean proxy.
static java.lang.Object create(java.lang.Class intf, java.lang.String name, MBeanServer (src)  server)
          Create an MBean proxy.
 ObjectName (src) getMBeanProxyObjectName()
           
 RMIAdaptor (src) getMBeanProxyRMIAdaptor()
           
protected  RMIAdaptor (src) getRmiAdaptor()
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Invoke the configured MBean via the target MBeanServer and decode any resulting JMX exceptions that are thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Invoke the configured MBean via the target MBeanServer and decode any resulting JMX exceptions that are thrown.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

getRmiAdaptor

protected RMIAdaptor (src)  getRmiAdaptor()
                            throws java.lang.Exception
Throws:
java.lang.Exception

getMBeanProxyObjectName

public final ObjectName (src)  getMBeanProxyObjectName()

getMBeanProxyRMIAdaptor

public final RMIAdaptor (src)  getMBeanProxyRMIAdaptor()

create

public static java.lang.Object create(java.lang.Class intf,
                                      java.lang.String name,
                                      MBeanServer (src)  server)
                               throws java.lang.Exception
Create an MBean proxy.

Parameters:
intf - The interface which the proxy will implement.
name - A string used to construct the ObjectName of the MBean to proxy to.
server - The MBeanServer that contains the MBean to proxy to.
Returns:
A MBean proxy.
Throws:
java.lang.Exception - Invalid object name.

create

public static java.lang.Object create(java.lang.Class intf,
                                      ObjectName (src)  name,
                                      MBeanServer (src)  server)
                               throws java.lang.Exception
Create an MBean proxy.

Parameters:
intf - The interface which the proxy will implement.
name - The name of the MBean to proxy invocations to.
server - The MBeanServer that contains the MBean to proxy to.
Returns:
A MBean proxy.
Throws:
java.lang.Exception