public class

RequestFactoryServlet

extends HttpServlet
java.lang.Object
   ↳ javax.servlet.GenericServlet
     ↳ javax.servlet.http.HttpServlet
       ↳ com.google.gwt.requestfactory.server.RequestFactoryServlet

Class Overview

Handles GWT RequestFactory JSON requests.

Summary

Public Constructors
RequestFactoryServlet()
Constructs a new RequestFactoryServlet with a DefaultExceptionHandler.
RequestFactoryServlet(ExceptionHandler exceptionHandler, ServiceLayerDecorator... serviceDecorators)
Use this constructor in subclasses to provide a custom ExceptionHandler.
Public Methods
static HttpServletRequest getThreadLocalRequest()
Returns the thread-local HttpServletRequest.
static HttpServletResponse getThreadLocalResponse()
Returns the thread-local HttpServletResponse.
Protected Methods
void doPost(HttpServletRequest request, HttpServletResponse response)
Processes a POST to the server.
[Expand]
Inherited Methods
From class javax.servlet.http.HttpServlet
From class javax.servlet.GenericServlet
From class java.lang.Object
From interface javax.servlet.Servlet
From interface javax.servlet.ServletConfig

Public Constructors

public RequestFactoryServlet ()

Constructs a new RequestFactoryServlet with a DefaultExceptionHandler.

public RequestFactoryServlet (ExceptionHandler exceptionHandler, ServiceLayerDecorator... serviceDecorators)

Use this constructor in subclasses to provide a custom ExceptionHandler.

Parameters
exceptionHandler an ExceptionHandler instance
serviceDecorators an array of ServiceLayerDecorators that change how the RequestFactory request processor interact with the domain objects

Public Methods

public static HttpServletRequest getThreadLocalRequest ()

Returns the thread-local HttpServletRequest.

Returns
  • an HttpServletRequest instance

public static HttpServletResponse getThreadLocalResponse ()

Returns the thread-local HttpServletResponse.

Returns
  • an HttpServletResponse instance

Protected Methods

protected void doPost (HttpServletRequest request, HttpServletResponse response)

Processes a POST to the server.

Parameters
request an HttpServletRequest instance
response an HttpServletResponse instance
Throws
IOException if an internal I/O error occurs
ServletException if an error occurs in the servlet