| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|
com.newstep.solid.management.runtime.client
All Implemented Interfaces:
InvocationHandler
public class MBeanProxy
A convenience proxy for calling jmx based methods on a specific registered
mbean server running remotely on a given server with a connector enabled.
This has been tested with an RMI based connector only, but there is no
limitation on the underlying transport.
Usage:
MBeanInterface intf = (MBeanInterface)MBeanProxyFactory.create(mbsConnection,mbeanObjectName);
Note how the cast is very important, since it is the only thing that makes
the proxy object useful, by hiding the complexities of the jmx reflection
mechanisms.
Note: This proxy is not thread safe, and even if the synchronization
on the server implementation can not prevent erroneous conditions
to arise if concurrent invocations occur on the same local proxy object.
Includes validation for clients that are mapped correctly.
Author:
msimonsen
Implements:
InvocationHandler
| Field Summary |
private final static String |
|
private static Logger |
|
private MBeanServerConnection |
|
private ObjectInstance |
|
| Constructor Summary |
protected void |
|
| Method Summary |
public final Object |
buildInstance(ObjectInstance remoteInst, MBeanServerConnection mbsc) |
public Object |
invoke(Object proxy, Method method, Object arguments) |
protected void |
|
protected void |
|
private final static String className
Final.
Multiplicity:
1
Static.
private static Logger logger
Multiplicity:
1
Static.
private MBeanServerConnection mbeanServerConnection
Multiplicity:
1
private ObjectInstance remoteInstance
Multiplicity:
1
protected void MBeanProxy ()
Stereotype:
create
public final Object buildInstance (ObjectInstance remoteInst, MBeanServerConnection mbsc)
Builds an object instance from the remote instance and the
mbean server connection
Parameters:
remoteInst - the remote instance
mbsc - the mbean server connection
Return:
a local Proxy reference to a remote object
Final.
Throws:
ClassNotFoundException
public Object invoke (Object proxy, Method method, Object arguments)
Throws:
Throwable
protected void setRemoteInstance (ObjectInstance remoteInst)
protected void setServer (MBeanServerConnection mbsc)
| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|