org.atmosphere.gwt.server.impl
Class GwtAtmosphereResourceImpl

java.lang.Object
  extended by org.atmosphere.gwt.server.impl.GwtAtmosphereResourceImpl
All Implemented Interfaces:
GwtAtmosphereResource

public class GwtAtmosphereResourceImpl
extends Object
implements GwtAtmosphereResource

Author:
p.havelaar

Field Summary
static String HEARTBEAT_MESSAGE
           
 
Constructor Summary
GwtAtmosphereResourceImpl(org.atmosphere.cpr.AtmosphereResource resource, AtmosphereGwtHandler servlet, int heartBeatInterval)
           
GwtAtmosphereResourceImpl(org.atmosphere.cpr.AtmosphereResource resource, AtmosphereGwtHandler servlet, int heartBeatInterval, boolean escapeText)
           
 
Method Summary
 org.atmosphere.cpr.AtmosphereResource getAtmosphereResource()
           
<T> T
getAttribute(String name)
           
 org.atmosphere.cpr.Broadcaster getBroadcaster()
           
 String getConnectionUUID()
           
 int getHeartBeatInterval()
           
 org.atmosphere.cpr.AtmosphereRequest getRequest()
           
 org.atmosphere.cpr.AtmosphereResponse getResponse()
           
 javax.servlet.ServletContext getServletContext()
           
 javax.servlet.http.HttpSession getSession()
           
 javax.servlet.http.HttpSession getSession(boolean create)
           
 GwtResponseWriterImpl getWriterImpl()
           
 boolean isAlive()
          Check to see if this atmosphere resource is still in use by the system.
 boolean isSystemMessage(Serializable message)
           
 void post(List<?> messages)
           
 void post(Object message)
           
 void resume()
           
 void sendError(int statusCode, String message)
           
<T> void
setAttribute(String name, T value)
           
 void suspend()
           
 void suspend(int timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEARTBEAT_MESSAGE

public static final String HEARTBEAT_MESSAGE
See Also:
Constant Field Values
Constructor Detail

GwtAtmosphereResourceImpl

public GwtAtmosphereResourceImpl(org.atmosphere.cpr.AtmosphereResource resource,
                                 AtmosphereGwtHandler servlet,
                                 int heartBeatInterval)
                          throws IOException
Throws:
IOException

GwtAtmosphereResourceImpl

public GwtAtmosphereResourceImpl(org.atmosphere.cpr.AtmosphereResource resource,
                                 AtmosphereGwtHandler servlet,
                                 int heartBeatInterval,
                                 boolean escapeText)
                          throws IOException
Throws:
IOException
Method Detail

getBroadcaster

public org.atmosphere.cpr.Broadcaster getBroadcaster()
Specified by:
getBroadcaster in interface GwtAtmosphereResource

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface GwtAtmosphereResource

getSession

public javax.servlet.http.HttpSession getSession()
Specified by:
getSession in interface GwtAtmosphereResource

getSession

public javax.servlet.http.HttpSession getSession(boolean create)
Specified by:
getSession in interface GwtAtmosphereResource

getHeartBeatInterval

public int getHeartBeatInterval()
Specified by:
getHeartBeatInterval in interface GwtAtmosphereResource

post

public void post(Object message)
Specified by:
post in interface GwtAtmosphereResource

post

public void post(List<?> messages)
Specified by:
post in interface GwtAtmosphereResource

getAtmosphereResource

public org.atmosphere.cpr.AtmosphereResource getAtmosphereResource()
Specified by:
getAtmosphereResource in interface GwtAtmosphereResource

isAlive

public boolean isAlive()
Check to see if this atmosphere resource is still in use by the system. It will query the associated broadcaster if it is still referenced.

Specified by:
isAlive in interface GwtAtmosphereResource
Returns:

isSystemMessage

public boolean isSystemMessage(Serializable message)
Specified by:
isSystemMessage in interface GwtAtmosphereResource

getRequest

public org.atmosphere.cpr.AtmosphereRequest getRequest()
Specified by:
getRequest in interface GwtAtmosphereResource

getResponse

public org.atmosphere.cpr.AtmosphereResponse getResponse()
Specified by:
getResponse in interface GwtAtmosphereResource

getConnectionUUID

public String getConnectionUUID()
Specified by:
getConnectionUUID in interface GwtAtmosphereResource

suspend

public void suspend()
             throws IOException
Throws:
IOException

suspend

public void suspend(int timeout)
             throws IOException
Throws:
IOException

resume

public void resume()

setAttribute

public <T> void setAttribute(String name,
                             T value)
Specified by:
setAttribute in interface GwtAtmosphereResource

getAttribute

public <T> T getAttribute(String name)
Specified by:
getAttribute in interface GwtAtmosphereResource

getWriterImpl

public GwtResponseWriterImpl getWriterImpl()

sendError

public void sendError(int statusCode,
                      String message)
Specified by:
sendError in interface GwtAtmosphereResource


Copyright © 2013. All Rights Reserved.