|
|||||||||
| 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.AbstractRemoteServiceServlet
org.atmosphere.gwt.poll.AtmospherePollService
public class AtmospherePollService
| Nested Class Summary | |
|---|---|
class |
AtmospherePollService.SuspendInfo
|
| Field Summary | |
|---|---|
static String |
GWT_REQUEST
|
static String |
GWT_SUSPENDED
|
| Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet |
|---|
perThreadRequest, perThreadResponse |
| Constructor Summary | |
|---|---|
AtmospherePollService()
The default constructor. |
|
| Method Summary | |
|---|---|
protected com.google.gwt.user.server.rpc.SerializationPolicy |
doGetSerializationPolicy(javax.servlet.http.HttpServletRequest request,
String moduleBaseURL,
String strongName)
Gets the SerializationPolicy for given module base URL and strong
name if there is one. |
com.google.gwt.user.server.rpc.SerializationPolicy |
getSerializationPolicy(String moduleBaseURL,
String strongName)
|
protected boolean |
isSuspended()
|
protected void |
onAfterRequestDeserialized(com.google.gwt.user.server.rpc.RPCRequest rpcRequest)
|
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)
Process a call originating from the given request. |
void |
processPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Standard HttpServlet method: handle the POST. |
protected static boolean |
shouldCompressResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String responsePayload)
Determines whether the response to a given servlet request should or should not be GZIP compressed. |
protected AtmospherePollService.SuspendInfo |
suspend()
|
protected AtmospherePollService.SuspendInfo |
suspend(long timeout)
|
protected static void |
writeResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
String responsePayload)
|
| Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet |
|---|
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, readContent |
| 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 |
|---|
public static final String GWT_SUSPENDED
public static final String GWT_REQUEST
| Constructor Detail |
|---|
public AtmospherePollService()
| Method Detail |
|---|
protected AtmospherePollService.SuspendInfo suspend()
protected AtmospherePollService.SuspendInfo suspend(long timeout)
protected boolean isSuspended()
protected void onAfterRequestDeserialized(com.google.gwt.user.server.rpc.RPCRequest rpcRequest)
onAfterRequestDeserialized in class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
public final void processPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException,
com.google.gwt.user.client.rpc.SerializationException
processPost in class com.google.gwt.user.server.rpc.AbstractRemoteServiceServletjavax.servlet.ServletException
com.google.gwt.user.client.rpc.SerializationException
IOException
protected static boolean shouldCompressResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String responsePayload)
This implementation currently returns true if the response
string's estimated byte length is longer than 256 bytes. Subclasses can
override this logic.
request - the request being servedresponse - the response that will be written intoresponsePayload - the payload that is about to be sent to the client
true if responsePayload should be GZIP compressed,
otherwise false.
protected static void writeResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.ServletContext context,
String responsePayload)
throws IOException
IOException
public final com.google.gwt.user.server.rpc.SerializationPolicy getSerializationPolicy(String moduleBaseURL,
String strongName)
getSerializationPolicy in interface com.google.gwt.user.server.rpc.SerializationPolicyProvider
public String processCall(String payload)
throws com.google.gwt.user.client.rpc.SerializationException
RPC.invokeAndEncodeResponse(Object, java.lang.reflect.Method, Object[])
method to do the actual work.
Subclasses may optionally override this method to handle the payload in any
way they desire (by routing the request to a framework component, for
instance). The HttpServletRequest and HttpServletResponse
can be accessed via the AbstractRemoteServiceServlet.getThreadLocalRequest() and
AbstractRemoteServiceServlet.getThreadLocalResponse() methods.
payload - the UTF-8 request payload
IncompatibleRemoteServiceException
com.google.gwt.user.client.rpc.SerializationException - if we cannot serialize the response
com.google.gwt.user.server.rpc.UnexpectedException - if the invocation throws a checked exception
that is not declared in the service method's signature
RuntimeException - if the service method throws an unchecked
exception (the exception will be the one thrown by the service)
protected com.google.gwt.user.server.rpc.SerializationPolicy doGetSerializationPolicy(javax.servlet.http.HttpServletRequest request,
String moduleBaseURL,
String strongName)
SerializationPolicy for given module base URL and strong
name if there is one.
Override this method to provide a SerializationPolicy using an
alternative approach.
request - the HTTP request being servicedmoduleBaseURL - as specified in the incoming payloadstrongName - a strong name that uniquely identifies a serialization
policy file
SerializationPolicy for the given module base URL and
strong name, or null if there is noneprotected void onAfterResponseSerialized(String serializedResponse)
serializedResponse - protected void onBeforeRequestDeserialized(String serializedRequest)
serializedRequest -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||