Class
Tree
          
PREV CLASS NEXT CLASS
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
 

com.newstep.solid.management.runtime.client
Class MBeanProxy
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
setRemoteInstance(ObjectInstance remoteInst)
protected void
setServer(MBeanServerConnection mbsc)
Field Detail
className
private final static String className
Final.
Multiplicity:
1
Static.
 

logger
private static Logger logger
Multiplicity:
1
Static.
 

mbeanServerConnection
private MBeanServerConnection mbeanServerConnection
Multiplicity:
1
 

remoteInstance
private ObjectInstance remoteInstance
Multiplicity:
1
 
Constructor Detail
MBeanProxy
protected void MBeanProxy ()
 
Stereotype:
create
 
Method Detail
buildInstance
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
 

invoke
public Object invoke (Object proxy, Method method, Object arguments)
 
Throws:
Throwable
 

setRemoteInstance
protected void setRemoteInstance (ObjectInstance remoteInst)
 
 

setServer
protected void setServer (MBeanServerConnection mbsc)
 
 

Class
Tree
          
PREV CLASS NEXT CLASS
SUMMARY: INNER | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD