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

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bycom.google.gwt.user.server.rpc.RemoteServiceServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class RemoteServiceServlet
extends HttpServlet

The servlet base class for your RPC service implementations that automatically deserializes incoming requests from the client and serializes outgoing responses for client/server RPCs.

See Also:
Serialized Form

Nested Class Summary
static interface RemoteServiceServlet.CallResponse
           
 
Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
Constructor Summary
RemoteServiceServlet()
          The default constructor.
 
Method Summary
 void doPost(HttpServletRequest request, HttpServletResponse response)
          This is called internally.
protected  HttpServletRequest getThreadLocalRequest()
          Gets the HttpServletRequest object for the current call.
protected  void onAfterResponseSerialized(String serializedResponse)
          Override this method to examine the serialized response that will be returned to the client.
protected  void onBeforeRequestDeserialized(String serializedRequest)
          Override this method to examine the serialized version of the request payload before it is deserialized into objects.
 String processCall(String payload)
          This is public so that it can be unit tested easily without HTTP.
 
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
equals, finalize, hashCode, toString
 

Constructor Detail

RemoteServiceServlet

public RemoteServiceServlet()
The default constructor.

Method Detail

doPost

public final void doPost(HttpServletRequest request,
                         HttpServletResponse response)
This is called internally.


processCall

public String processCall(String payload)
                   throws SerializationException
This is public so that it can be unit tested easily without HTTP.

Throws:
SerializationException

getThreadLocalRequest

protected HttpServletRequest getThreadLocalRequest()
Gets the HttpServletRequest object for the current call. It is stored thread-locally so that simultaneous invocations can have different request objects.


onAfterResponseSerialized

protected void onAfterResponseSerialized(String serializedResponse)
Override this method to examine the serialized response that will be returned to the client. The default implementation does nothing and need not be called by subclasses.


onBeforeRequestDeserialized

protected void onBeforeRequestDeserialized(String serializedRequest)
Override this method to examine the serialized version of the request payload before it is deserialized into objects. The default implementation does nothing and need not be called by subclasses.



This javadoc distribution was not produced by Google. The official documentation is here.