marquee.xmlrpc.objectcomm
Class Proxy

java.lang.Object
  extended by marquee.xmlrpc.XmlRpcProxy
      extended by marquee.xmlrpc.objectcomm.Proxy
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class Proxy
extends XmlRpcProxy

Performs the same tasks as the XmlRpcProxy but also supports arbitrary Java objects as return values. It relies on the Serializer which serializes Java objects as structs and InvocationProcessor which is able to rebuild the object parameters on the server side.

Before Proxy may be used the Serializer must be added to the XmlRpcSerializer mechanism on both the server and the client side and the InvocationProcessor must be registered with the XmlRpcServer.

Since:
JDK 1.3
Version:
$Revision: 1.3 $
Author:
Rainer Bischof
See Also:
XmlRpcProxy, marquee.xmlrpc.objectcomms.Serializer, marquee.xmlrpc.objectcomms.InvocationProcessor

Method Summary
static java.lang.Object createProxy(java.lang.String host, int port, java.lang.String path, java.lang.Class[] interfaces)
           
static java.lang.Object createProxy(java.lang.String host, int port, java.lang.String path, java.lang.String objectName, java.lang.Class[] interfaces)
           
static java.lang.Object createProxy(java.net.URL url, java.lang.Class[] interfaces)
           
static java.lang.Object createProxy(java.net.URL url, java.lang.String objectName, java.lang.Class[] interfaces)
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
          Handles method calles invoked on the proxy object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createProxy

public static java.lang.Object createProxy(java.lang.String host,
                                           int port,
                                           java.lang.String path,
                                           java.lang.Class[] interfaces)
                                    throws XmlRpcException
Throws:
XmlRpcException

createProxy

public static java.lang.Object createProxy(java.lang.String host,
                                           int port,
                                           java.lang.String path,
                                           java.lang.String objectName,
                                           java.lang.Class[] interfaces)
                                    throws XmlRpcException
Throws:
XmlRpcException

createProxy

public static java.lang.Object createProxy(java.net.URL url,
                                           java.lang.Class[] interfaces)
                                    throws XmlRpcException
Throws:
XmlRpcException

createProxy

public static java.lang.Object createProxy(java.net.URL url,
                                           java.lang.String objectName,
                                           java.lang.Class[] interfaces)
                                    throws XmlRpcException
Throws:
XmlRpcException

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Description copied from class: XmlRpcProxy
Handles method calles invoked on the proxy object. This is not used by the application but has to be public so that the dynamic proxy has access to it. Just hand call over to the performCall method

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Overrides:
invoke in class XmlRpcProxy
Returns:
Any of the values returned by an XmlRpcClient
Throws:
java.lang.Throwable