com.google.gwt.user.server.rpc
Class RPCCopy

java.lang.Object
  extended by com.google.gwt.user.server.rpc.RPCCopy

public class RPCCopy
extends java.lang.Object

Encapsulation of both RPCCopy for GWT 1.4 and GWT 1.5 (damned invokeAndEncodeResponse !!!!!)

Author:
bruno.marchesson

Field Summary
protected  com.google.gwt.user.server.rpc.RPCCopy.Version _version
          The current GWT version
 
Method Summary
 RPCRequest decodeRequest(java.lang.String encodedRequest, java.lang.Class type, SerializationPolicyProvider serializationPolicyProvider)
          Decode request method
 java.lang.String encodeResponseForFailure(java.lang.reflect.Method serviceMethod, java.lang.Throwable cause, SerializationPolicy serializationPolicy)
          Encode failure response method.
 java.lang.String encodeResponseForSuccess(java.lang.reflect.Method serviceMethod, java.lang.Object object, SerializationPolicy serializationPolicy)
          Encode successful response method.
static RPCCopy getInstance()
           
 java.lang.Object invoke(java.lang.Object target, java.lang.reflect.Method serviceMethod, java.lang.Object[] args, SerializationPolicy serializationPolicy)
          Invoke method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_version

protected com.google.gwt.user.server.rpc.RPCCopy.Version _version
The current GWT version

Method Detail

getInstance

public static RPCCopy getInstance()
Returns:
the unique instance of the singleton

decodeRequest

public RPCRequest decodeRequest(java.lang.String encodedRequest,
                                java.lang.Class type,
                                SerializationPolicyProvider serializationPolicyProvider)
Decode request method


invoke

public java.lang.Object invoke(java.lang.Object target,
                               java.lang.reflect.Method serviceMethod,
                               java.lang.Object[] args,
                               SerializationPolicy serializationPolicy)
                        throws SerializationException,
                               java.lang.reflect.InvocationTargetException
Invoke method

Throws:
java.lang.reflect.InvocationTargetException
SerializationException

encodeResponseForSuccess

public java.lang.String encodeResponseForSuccess(java.lang.reflect.Method serviceMethod,
                                                 java.lang.Object object,
                                                 SerializationPolicy serializationPolicy)
                                          throws SerializationException
Encode successful response method.

Throws:
SerializationException

encodeResponseForFailure

public java.lang.String encodeResponseForFailure(java.lang.reflect.Method serviceMethod,
                                                 java.lang.Throwable cause,
                                                 SerializationPolicy serializationPolicy)
                                          throws SerializationException
Encode failure response method.

Throws:
SerializationException