|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AtmosphereEvent<E,F>
A AtmosphereEvent encapsulates the mechanism to suspend(),
resume() and broadcast (getBroadcaster()) messages among
suspended response. AtmosphereEvent are passed at runtime to an
instance of AtmosphereHandler.
| Method Summary | |
|---|---|
Broadcaster |
getBroadcaster()
Return the current Broadcaster |
Object |
getMessage()
Return the object that were pass to Broadcaster.broadcast(java.lang.Object) |
E |
getRequest()
Return the underlying |
F |
getResponse()
Return the underlying |
ServletContext |
getServletContext()
Return the ServletContext |
String |
getWebServerName()
Return the WebServer we are running on. |
boolean |
isResuming()
Return true/tt> if that resume() has been
invoked |
boolean |
isSuspended()
Return true/tt> if that suspend() has been
invoked and set to true |
void |
resume()
Complete the HttpServletResponse and finish/commit it. |
void |
setBroadcaster(Broadcaster broadcaster)
Set the current Broadcaster |
void |
suspend()
Suspend the HttpServletResponse indefinitely. |
void |
suspend(long timeout)
Suspend the HttpServletResponse. |
| Method Detail |
|---|
void resume()
HttpServletResponse and finish/commit it.
boolean isSuspended()
suspend() has been
invoked and set to true
suspend() has been
invoked and set to trueboolean isResuming()
resume() has been
invoked
resume() has been
invoked and set to truevoid suspend()
HttpServletResponse indefinitely.
Suspending a HttpServletResponse will
tell the underlying container to avoid recycling objects associated with
the current instance, and also to avoid commiting response.
void suspend(long timeout)
HttpServletResponse. Suspending a HttpServletResponse will
tell the underlying container to avoid recycling objects associated with
the current instance, and also to avoid commiting response.
timeout - The maximum amount of time, in milliseconds,
a HttpServletResponse can be suspended. When the timeout expires (because
nothing has been written or because the resume()
or AtmosphereEvent#cancel()), the HttpServletResponse will be automatically
resumed and commited. Usage of any methods of a HttpServletResponse that
times out will throw an IllegalStateException.E getRequest()
F getResponse()
ServletContext getServletContext()
ServletContext
ServletContextBroadcaster getBroadcaster()
Broadcaster
void setBroadcaster(Broadcaster broadcaster)
Broadcaster
String getWebServerName()
Object getMessage()
Broadcaster.broadcast(java.lang.Object)
Broadcaster.broadcast(java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||