|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
public abstract class AbstractRemoteServiceServlet
An abstract base class containing utility methods.
Field Summary | |
---|---|
protected java.lang.ThreadLocal<javax.servlet.http.HttpServletRequest> |
perThreadRequest
|
protected java.lang.ThreadLocal<javax.servlet.http.HttpServletResponse> |
perThreadResponse
|
Constructor Summary | |
---|---|
AbstractRemoteServiceServlet()
|
Method Summary | |
---|---|
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Standard HttpServlet method: handle the POST. |
protected void |
doUnexpectedFailure(java.lang.Throwable e)
Override this method to control what should happen when an exception escapes the doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) method. |
protected java.lang.String |
getPermutationStrongName()
Returns the strong name of the permutation, as reported by the client that issued the request, or null if it could not be determined. |
protected javax.servlet.http.HttpServletRequest |
getThreadLocalRequest()
Gets the HttpServletRequest object for the current call. |
protected javax.servlet.http.HttpServletResponse |
getThreadLocalResponse()
Gets the HttpServletResponse object for the current call. |
protected void |
onAfterRequestDeserialized(RPCRequest rpcRequest)
Override this method to examine the deserialized version of the request before the call to the servlet method is made. |
protected abstract void |
processPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Called by doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) for type-specific processing of the request. |
protected java.lang.String |
readContent(javax.servlet.http.HttpServletRequest request)
Override this method in order to control the parsing of the incoming request. |
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 |
Field Detail |
---|
protected transient java.lang.ThreadLocal<javax.servlet.http.HttpServletRequest> perThreadRequest
protected transient java.lang.ThreadLocal<javax.servlet.http.HttpServletResponse> perThreadResponse
Constructor Detail |
---|
public AbstractRemoteServiceServlet()
Method Detail |
---|
public final void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
processPost(HttpServletRequest, HttpServletResponse)
.
This doPost method swallows ALL exceptions, logs them in the
ServletContext, and returns a GENERIC_FAILURE_MSG response with status code
500.
doPost
in class javax.servlet.http.HttpServlet
protected void doUnexpectedFailure(java.lang.Throwable e)
doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
method. The default implementation will log the
failure and send a generic failure response to the client.
An "expected failure" is an exception thrown by a service method that is declared in the signature of the service method. These exceptions are serialized back to the client, and are not passed to this method. This method is called only for exceptions or errors that are not part of the service method's signature, or that result from SecurityExceptions, SerializationExceptions, or other failures within the RPC framework.
Note that if the desired behavior is to both send the GENERIC_FAILURE_MSG response AND to rethrow the exception, then this method should first send the GENERIC_FAILURE_MSG response itself (using getThreadLocalResponse), and then rethrow the exception. Rethrowing the exception will cause it to escape into the servlet container.
e
- the exception which was thrownprotected final java.lang.String getPermutationStrongName()
null
if it could not be determined.
This information is encoded in the
"X-GWT-Permutation"
HTTP header.
protected final javax.servlet.http.HttpServletRequest getThreadLocalRequest()
HttpServletRequest
object for the current call. It is
stored thread-locally so that simultaneous invocations can have different
request objects.
protected final javax.servlet.http.HttpServletResponse getThreadLocalResponse()
HttpServletResponse
object for the current call. It
is stored thread-locally so that simultaneous invocations can have
different response objects.
protected void onAfterRequestDeserialized(RPCRequest rpcRequest)
rpcRequest
- protected abstract void processPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Throwable
doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
for type-specific processing of the request.
Because doPost
swallows all Throwables
, this
method may throw any exception the implementor wishes.
java.lang.Throwable
protected java.lang.String readContent(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException, java.io.IOException
Transfer-Encoding:
chuncked
.
request
- the incoming request
javax.servlet.ServletException
java.io.IOException
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |