## mx4j.tools.connector
Class RemoteStandardMBeanProxy

    java.lang.Object
      mx4j.util.StandardMBeanProxy
          mx4j.tools.connector.RemoteStandardMBeanProxy

Deprecated. Replaced by `MBeanServerInvocationHandler`

public class RemoteStandardMBeanProxy
extends StandardMBeanProxy

A utility class that creates proxies for invocation on standard MBeans (does not work for DynamicMBeans) on remote MBeanServers.
It is recommended that a new interface is used instead of the management interface of the MBean. This new interface would be a subset of the management interface and the methods would declare an IOException (or a subclass such as RemoteException) in the throws clause of each method. If this suggestion is not followed, remote exception will be thrown as `UndeclaredThrowableException`s.
Usage example:

     public interface MyServiceMBean
     {
        public void sayHello(String user) throws UnknownUserException;
        public void doesNotMakeSenseRemotely();
     }
     public class MyService implements MyServiceMBean {...}
     public interface MyRemoteService
     {
        public void sayHello(String user) throws UnknownUserException, RemoteException;
     }
     pulic class Main
     {
        public static void main(String[] args) throws Exception
        {
           RemoteMBeanServer server = ...;
           ObjectName myServiceObjectName = ...;

           MyRemoteService mbean = (MyRemoteService)RemoteStandardMBeanProxy.create(MyRemoteService.class, server, myServiceObjectName);

           mbean.sayHello("World");
        }
     }

Version:
  $Revision: 1.3 $

Nested Class Summary

Nested classes inherited from class mx4j.util.StandardMBeanProxy
`StandardMBeanProxy.Handler`

Constructor Summary
`RemoteStandardMBeanProxy()` Deprecated.

Method Summary
`static java.lang.Object` `create(java.lang.Class mbeanInterface, javax.management.MBeanServerConnection server, javax.management.ObjectName name)` Deprecated. Creates a proxy with the given MBean interface for an MBean with the specified ObjectName living in the specified remote MBeanServer.

Methods inherited from class mx4j.util.StandardMBeanProxy
`create, create`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RemoteStandardMBeanProxy

    public RemoteStandardMBeanProxy()

  Deprecated.

Method Detail

### create

    public static java.lang.Object create(java.lang.Class mbeanInterface,
                                          javax.management.MBeanServerConnection server,
                                          javax.management.ObjectName name)

  Deprecated.
  Creates a proxy with the given MBean interface for an MBean with the specified ObjectName living in the specified remote MBeanServer.
  If the MBean is unregistered after the proxy has been created, an attempt to call any method on the proxy will result in a `UndeclaredThrowableException` being thrown. MBeanServer's behavior would be to throw an InstanceNotFoundException, but this exception is normally not declared in the throws clause of MBean's management interface, thus resulting in the UndeclaredThrowableException being thrown instead.

Copyright © 2001-2003 MX4J Team. All Rights Reserved.