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

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.rpc.server.RpcServlet
                  extended by com.google.gwt.user.server.rpc.HybridServiceServlet
All Implemented Interfaces:
SerializationPolicyProvider, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class HybridServiceServlet
extends com.google.gwt.rpc.server.RpcServlet
implements SerializationPolicyProvider

EXPERIMENTAL and subject to change. Do not use this in production code.

This RemoteServiceServlet provides support for both legacy and deRPC clients at the cost of additional runtime overhead and API complexity.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.rpc.server.RpcServlet
CLIENT_ORACLE_EXTENSION
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
HybridServiceServlet()
           
 
Method Summary
protected  SerializationPolicy doGetSerializationPolicy(javax.servlet.http.HttpServletRequest request, java.lang.String moduleBaseURL, java.lang.String strongName)
          Gets the SerializationPolicy for given module base URL and strong name if there is one.
 com.google.gwt.rpc.server.ClientOracle getClientOracle()
          This method will return null instead of throwing an exception.
 SerializationPolicy getSerializationPolicy(java.lang.String moduleBaseURL, java.lang.String strongName)
          Returns a SerializationPolicy for a given module base URL and serialization policy strong name.
protected  void onAfterResponseSerialized(java.lang.String serializedResponse)
           
 void processCall(com.google.gwt.rpc.server.ClientOracle clientOracle, java.lang.String payload, java.io.OutputStream stream)
           
 java.lang.String processCall(java.lang.String payload)
           
 
Methods inherited from class com.google.gwt.rpc.server.RpcServlet
allowHostedModeConnections, findClientOracleData, getRequestModuleBasePath, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HybridServiceServlet

public HybridServiceServlet()
Method Detail

getClientOracle

public com.google.gwt.rpc.server.ClientOracle getClientOracle()
This method will return null instead of throwing an exception.

Overrides:
getClientOracle in class com.google.gwt.rpc.server.RpcServlet

getSerializationPolicy

public final SerializationPolicy getSerializationPolicy(java.lang.String moduleBaseURL,
                                                        java.lang.String strongName)
Description copied from interface: SerializationPolicyProvider
Returns a SerializationPolicy for a given module base URL and serialization policy strong name.

Specified by:
getSerializationPolicy in interface SerializationPolicyProvider
Parameters:
moduleBaseURL - the URL for the module
strongName - strong name of the serialization policy for the specified module URL
Returns:
a SerializationPolicy for a given module base URL and RPC strong name; must not return null

processCall

public void processCall(com.google.gwt.rpc.server.ClientOracle clientOracle,
                        java.lang.String payload,
                        java.io.OutputStream stream)
                 throws SerializationException
Overrides:
processCall in class com.google.gwt.rpc.server.RpcServlet
Throws:
SerializationException

processCall

public java.lang.String processCall(java.lang.String payload)
                             throws SerializationException
Throws:
SerializationException

doGetSerializationPolicy

protected SerializationPolicy doGetSerializationPolicy(javax.servlet.http.HttpServletRequest request,
                                                       java.lang.String moduleBaseURL,
                                                       java.lang.String strongName)
Gets the SerializationPolicy for given module base URL and strong name if there is one. Override this method to provide a SerializationPolicy using an alternative approach.

Parameters:
request - the HTTP request being serviced
moduleBaseURL - as specified in the incoming payload
strongName - a strong name that uniquely identifies a serialization policy file
Returns:
a SerializationPolicy for the given module base URL and strong name, or null if there is none

onAfterResponseSerialized

protected void onAfterResponseSerialized(java.lang.String serializedResponse)
Parameters:
serializedResponse -