org.oddjob.jmx.client
Class ClientNode

java.lang.Object
  extended by org.oddjob.jmx.client.ClientNode
All Implemented Interfaces:
InvocationHandler, Exportable

public class ClientNode
extends Object
implements InvocationHandler, Exportable

The client side representation of a remote node. A proxy is used to implement a mirror of the remote node. This class is the invocation handler for that proxy. This class is never accessed directly by client code.

On creation the client node will lookup up various things on the server on configure the proxy, register for notifications and start a resync.

It is possible that a serverside node has bean created and destroyed and that the client hasn't caught up. In this case dead placeholder nodes are put in the tree. They should be short lived, and removed when the client catches up with the notifications.

Author:
Rob Gordon

Nested Class Summary
 class ClientNode.Handle
           
 
Method Summary
static ClientNode.Handle createProxyFor(ObjectName objectName, ClientSideToolkit toolkit)
          Static factory method.
 Transportable exportTransportable()
          Part of the implementation of the HostRelative interface.
 Object invoke(Object proxy, Method method, Object[] args)
          Called by the proxy to invoke a method.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createProxyFor

public static ClientNode.Handle createProxyFor(ObjectName objectName,
                                               ClientSideToolkit toolkit)
Static factory method.

Parameters:
objectName - The remote node.
serverConnection - The server connection.
Returns:
A proxy oject that implements it's interfaces.
Throws:
RemoteException

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Called by the proxy to invoke a method.

Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

toString

public String toString()
Overrides:
toString in class Object

exportTransportable

public Transportable exportTransportable()
Part of the implementation of the HostRelative interface. This is called when the proxy is just about to be sent over the network.

Specified by:
exportTransportable in interface Exportable
Returns:
The object for transit.