net.sf.gwtspringrpc.servlet
Class DelegatingRemoteServiceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
              extended by net.sf.gwtspringrpc.servlet.AbstractRemoteServiceServlet
                  extended by net.sf.gwtspringrpc.servlet.DelegatingRemoteServiceServlet
All Implemented Interfaces:
SerializationPolicyProvider, Serializable, Servlet, ServletConfig

public class DelegatingRemoteServiceServlet
extends AbstractRemoteServiceServlet

This class implements a remote service servlet that delegates remote procedure calls to a bean managed by a Spring application context. The name of the bean is determined by the BeanNameResolver instance.

Since:
1.0
Author:
Mike Clemens
See Also:
Serialized Form

Field Summary
protected  BeanNameResolver beanNameResolver
          The object used to resolve the bean name
private  Log log
           
private static long serialVersionUID
           
 
Constructor Summary
DelegatingRemoteServiceServlet()
           
 
Method Summary
 void init()
          Initializes the servlet.
 String processCall(String payload)
          Processes a call from the the given request, delegating the actual method call to a bean retrieved from the Spring application context.
 
Methods inherited from class net.sf.gwtspringrpc.servlet.AbstractRemoteServiceServlet
getBean, getBean, getWebApplicationContext, instantiate
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
doGetSerializationPolicy, doPost, doUnexpectedFailure, getSerializationPolicy, getThreadLocalRequest, getThreadLocalResponse, onAfterResponseSerialized, onBeforeRequestDeserialized, shouldCompressResponse
 
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, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private final Log log

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

beanNameResolver

protected BeanNameResolver beanNameResolver
The object used to resolve the bean name

Constructor Detail

DelegatingRemoteServiceServlet

public DelegatingRemoteServiceServlet()
Method Detail

processCall

public String processCall(String payload)
                   throws SerializationException
Processes a call from the the given request, delegating the actual method call to a bean retrieved from the Spring application context.

Overrides:
processCall in class AbstractRemoteServiceServlet
Parameters:
payload - The UTF-8 request payload
Returns:
The encoded method response
Throws:
SerializationException - If the response cannot be serialized

init

public void init()
          throws ServletException
Initializes the servlet. This method will check for an overridden BeanNameResolver instance, first in the servlet configuration and then in the GWTSpringRPC configuration properties file.

Overrides:
init in class AbstractRemoteServiceServlet
Throws:
ServletException - If an exception occurs initializing the servlet