|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.handler.AbstractReflectorAtmosphereHandler
org.atmosphere.gwt.server.AtmosphereGwtHandler
public class AtmosphereGwtHandler
| Field Summary | |
|---|---|
static int |
DO_COMET_RESUME
|
static String |
GWT_BROADCASTER_ID
|
protected org.slf4j.Logger |
logger
|
static int |
NO_TIMEOUT
|
| Constructor Summary | |
|---|---|
AtmosphereGwtHandler()
|
|
| Method Summary | |
|---|---|
void |
broadcast(List<?> messages,
GwtAtmosphereResource resource)
|
void |
broadcast(Object message,
GwtAtmosphereResource resource)
|
void |
cometTerminated(GwtAtmosphereResource cometResponse,
boolean serverInitiated)
When the connection has been terminated method will be called to let you know about it. |
protected int |
computeHeartbeat(int requestedHeartbeat)
|
protected Object |
deserialize(char[] data,
SerialMode mode)
|
protected Object |
deserialize(String data,
SerialMode mode)
|
void |
destroy()
|
void |
disconnect(GwtAtmosphereResource resource)
|
int |
doComet(GwtAtmosphereResource resource)
This is the main entrypoint on the server that you will want to hook into and override. |
void |
doPost(javax.servlet.http.HttpServletRequest postRequest,
javax.servlet.http.HttpServletResponse postResponse,
List<?> messages,
GwtAtmosphereResource cometResource)
Called when a message is sent from the client using the post method. |
protected void |
doServerMessage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String connectionUUID)
|
void |
execute(Runnable command)
Execute a task in a seperate thread, the thread pool will grow and shrink depending on demand |
protected SerialMode |
getDefaultSerialMode()
Specifies the default SerialMode for this AtmosphereHandler. |
protected GwtRpcDeserializer |
getGwtRpc()
|
int |
getHeartbeat()
|
protected JSONDeserializer |
getJSONDeserializer()
|
javax.servlet.ServletContext |
getServletContext()
|
void |
init(javax.servlet.ServletConfig servletConfig)
|
boolean |
isEscapeText()
|
protected GwtAtmosphereResource |
lookupResource(String connectionUUID)
This can be used to lookup a resource for instance if you are implementing a remote service call The unique UUID is set by the framework |
void |
onRequest(org.atmosphere.cpr.AtmosphereResource resource)
|
void |
post(javax.servlet.http.HttpServletRequest postRequest,
javax.servlet.http.HttpServletResponse postResponse,
List<?> messages,
GwtAtmosphereResource cometResource)
|
protected void |
reapResources()
|
void |
setEscapeText(boolean escapeText)
|
void |
setHeartbeat(int heartbeat)
|
void |
terminate(GwtAtmosphereResource cometResponse,
boolean serverInitiated)
|
String |
toString()
|
| Methods inherited from class org.atmosphere.handler.AbstractReflectorAtmosphereHandler |
|---|
onStateChange, postStateChange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.atmosphere.cpr.AtmosphereHandler |
|---|
onStateChange |
| Field Detail |
|---|
public static final int NO_TIMEOUT
public static final int DO_COMET_RESUME
public static final String GWT_BROADCASTER_ID
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public AtmosphereGwtHandler()
| Method Detail |
|---|
public int doComet(GwtAtmosphereResource resource)
throws javax.servlet.ServletException,
IOException
AtmosphereClient#post method in the onConnected event.
resource -
javax.servlet.ServletException
IOException
public void cometTerminated(GwtAtmosphereResource cometResponse,
boolean serverInitiated)
cometResponse - serverInitiated -
public void doPost(javax.servlet.http.HttpServletRequest postRequest,
javax.servlet.http.HttpServletResponse postResponse,
List<?> messages,
GwtAtmosphereResource cometResource)
messages - cometResource - protected GwtAtmosphereResource lookupResource(String connectionUUID)
connectionUUID -
public void init(javax.servlet.ServletConfig servletConfig)
throws javax.servlet.ServletException
init in interface org.atmosphere.cpr.AtmosphereServletProcessorjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface org.atmosphere.cpr.AtmosphereHandlerdestroy in class org.atmosphere.handler.AbstractReflectorAtmosphereHandlerpublic boolean isEscapeText()
public void setEscapeText(boolean escapeText)
public int getHeartbeat()
public void setHeartbeat(int heartbeat)
public javax.servlet.ServletContext getServletContext()
protected void reapResources()
public void onRequest(org.atmosphere.cpr.AtmosphereResource resource)
throws IOException
onRequest in interface org.atmosphere.cpr.AtmosphereHandlerIOException
protected void doServerMessage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String connectionUUID)
throws IOException
IOExceptionprotected SerialMode getDefaultSerialMode()
Specifies the default SerialMode for this AtmosphereHandler. This value is used if no
serial mode parameter is sent with the suspended request.
SerialMode if not specified in the suspended request's parameter map
protected Object deserialize(char[] data,
SerialMode mode)
throws SerializationException
SerializationException
protected Object deserialize(String data,
SerialMode mode)
throws SerializationException
SerializationExceptionprotected GwtRpcDeserializer getGwtRpc()
protected JSONDeserializer getJSONDeserializer()
public final void post(javax.servlet.http.HttpServletRequest postRequest,
javax.servlet.http.HttpServletResponse postResponse,
List<?> messages,
GwtAtmosphereResource cometResource)
public void broadcast(Object message,
GwtAtmosphereResource resource)
public void broadcast(List<?> messages,
GwtAtmosphereResource resource)
public void disconnect(GwtAtmosphereResource resource)
public void execute(Runnable command)
execute in interface Executorcommand - protected int computeHeartbeat(int requestedHeartbeat)
public void terminate(GwtAtmosphereResource cometResponse,
boolean serverInitiated)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||