|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.RemoteServiceServlet
net.sf.gwtspringrpc.servlet.AbstractRemoteServiceServlet
public abstract class AbstractRemoteServiceServlet
This abstract class extends the RemoteServiceServlet class to provide access
to a Spring web application context. The application context instance is
retrieved using a WebApplicationContextRetriever instance.
This class is extended by the DelegatingRemoteServiceServlet class which
delegates remote procedure calls to a bean managed by the Spring application
context. This class can also be extended by application code to write
remote service servlets with access to the Spring application context.
| Field Summary | |
|---|---|
private Log |
log
|
private WebApplicationContextRetriever |
webApplicationContextRetriever
The object used to retrieve the WebApplicationContext instance |
| Constructor Summary | |
|---|---|
AbstractRemoteServiceServlet()
|
|
| Method Summary | |
|---|---|
Object |
getBean(String name)
Retrieves a bean from the web application context. |
Object |
getBean(String name,
Class requiredType)
Retrieves a bean from the web application context and validates that it is of the required type. |
WebApplicationContext |
getWebApplicationContext()
Retrieves the WebApplicationContext. |
void |
init()
Initializes the servlet. |
protected Object |
instantiate(String classname,
Class targetClass)
Instantiates the specified class and validates that the resulting class is an instance of the target class. |
String |
processCall(String payload)
Assigns HTTP objects to the HTTPObjectHolder class before processing the remote procedure call. |
| 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 |
|---|
private final Log log
private WebApplicationContextRetriever webApplicationContextRetriever
| Constructor Detail |
|---|
public AbstractRemoteServiceServlet()
| Method Detail |
|---|
public String processCall(String payload)
throws SerializationException
processCall in class RemoteServiceServletpayload - The UTF-8 request payload
SerializationException - If the response cannot be serializedpublic WebApplicationContext getWebApplicationContext()
public Object getBean(String name)
name - The bean name
NoSuchBeanDefinitionException - If no bean matches the specified name
BeansException - If the bean could not be created
public Object getBean(String name,
Class requiredType)
name - The bean namerequiredType - The type the bean must match
NoSuchBeanDefinitionException - If no bean matches the specified name
BeanNotOfRequiredTypeException - If the bean is not of the required type
BeansException - If the bean could not be created
public void init()
throws ServletException
init in class GenericServletServletException - If an exception occurs initializing the servlet
protected Object instantiate(String classname,
Class targetClass)
throws ServletException
classname - The class to instantiatetargetClass - The class the resulting instance must be an instance
of
ServletException - If an exception occurs creating the instance
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||