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

Constructor Summary
GwtAtmosphereResourceImpl(AtmosphereResource<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse> resource, AtmosphereGwtHandler servlet, int heartBeatInterval)
           
 
Method Summary
 void broadcast(List<Serializable> messages)
          Deprecated because the name is deceiving.
 void broadcast(Serializable message)
          Deprecated because the name is deceiving.
 AtmosphereResource<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse> getAtmosphereResource()
           
<T> T
getAttribute(String name)
           
 Broadcaster getBroadcaster()
           
 int getConnectionID()
           
 int getHeartBeatInterval()
           
 javax.servlet.http.HttpServletRequest getRequest()
           
 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.
 void post(List<Serializable> messages)
           
 void post(Serializable message)
           
 void resume()
           
<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
 

Constructor Detail

GwtAtmosphereResourceImpl

public GwtAtmosphereResourceImpl(AtmosphereResource<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse> resource,
                                 AtmosphereGwtHandler servlet,
                                 int heartBeatInterval)
                          throws IOException
Throws:
IOException
Method Detail

getBroadcaster

public Broadcaster getBroadcaster()
Specified by:
getBroadcaster 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

broadcast

public void broadcast(Serializable message)
Description copied from interface: GwtAtmosphereResource
Deprecated because the name is deceiving. Use post instead

Specified by:
broadcast in interface GwtAtmosphereResource

broadcast

public void broadcast(List<Serializable> messages)
Description copied from interface: GwtAtmosphereResource
Deprecated because the name is deceiving. Use post instead

Specified by:
broadcast in interface GwtAtmosphereResource

post

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

post

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

getAtmosphereResource

public AtmosphereResource<javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse> 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
Parameters:
resource -
Returns:

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Specified by:
getRequest in interface GwtAtmosphereResource

getConnectionID

public int getConnectionID()
Specified by:
getConnectionID 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()


Copyright © 2011. All Rights Reserved.