rita.support.dyn
Class RiDynamicRemote

java.lang.Object
  extended by rita.support.dyn.RiDynamicRemote
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class RiDynamicRemote
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

A dynamic proxy invocation handler that enables dynamic typing for remote RiTa objects


Method Summary
static java.lang.Object implement(java.lang.Class[] ifaces, java.lang.Object object)
          Causes object to implement the listed interfaces.
static java.lang.Object implement(java.lang.Class iface, java.lang.Object object)
          Causes object to implement the interface and returns an instance of the object implementing interface even if interface was not declared in object.getClass()'s implements declaration.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

implement

public static java.lang.Object implement(java.lang.Class iface,
                                         java.lang.Object object)
Causes object to implement the interface and returns an instance of the object implementing interface even if interface was not declared in object.getClass()'s implements declaration. This works as long as all methods declared in interface are present in the object.

Parameters:
iface - The Java class of the interface to implement
object - The object to force to implement the interface
Returns:
the object, but now implementing the interface

implement

public static java.lang.Object implement(java.lang.Class[] ifaces,
                                         java.lang.Object object)
Causes object to implement the listed interfaces. Is succesful is all methods declared in the interfaces are present in the object.

Parameters:
ifaces - an array of Java classes representing the interfaces to implement
object - The object to force to implement the interfaces
Returns:
the object, but now implementing the interfaces

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable