public interface AtmosphereResourceEvent
Broadcaster.broadcast(java.lang.Object) is executed, when a Browser close
remotely close the connection or when a suspended times out or gets resumed. When
such events occurs, an instance of that class will be created and its associated
AtmosphereHandler.onStateChange(org.atmosphere.cpr.AtmosphereResourceEvent)
will be invoked.| Modifier and Type | Method and Description |
|---|---|
Broadcaster |
broadcaster()
Return the broadcaster associated with the
AtmosphereResource this object contains. |
java.lang.Object |
getMessage()
Return the object that were pass to
Broadcaster.broadcast(java.lang.Object) |
AtmosphereResource |
getResource()
Return the
AtmosphereResource associated with this event |
boolean |
isCancelled()
Return true when the remote client close the connection.
|
boolean |
isResumedOnTimeout()
Return true is the response gets resumed after a timeout.
|
boolean |
isResuming()
Return true/tt> if that
AtmosphereResource.resume() has been
invoked |
boolean |
isSuspended()
Return true/tt> if that
AtmosphereResource.suspend() has been
invoked and set to true |
AtmosphereResourceEvent |
setMessage(java.lang.Object o)
Set an Object that can be retrieved with
getMessage(). |
java.lang.Throwable |
throwable()
Return a
Throwable if an unexpected exception occured. |
AtmosphereResourceEvent |
write(byte[] o)
Write the
byte using the underlying AtmosphereResponse.getOutputStream() |
AtmosphereResourceEvent |
write(java.io.OutputStream os,
java.lang.Object o)
|
java.lang.Object getMessage()
Broadcaster.broadcast(java.lang.Object)Broadcaster.broadcast(java.lang.Object)AtmosphereResourceEvent setMessage(java.lang.Object o)
getMessage(). Note that the value may be overridden when
Broadcaster.broadcast(java.lang.Object) gets invoked.o - an Object that can be retrieved with getMessage().boolean isResumedOnTimeout()
boolean isCancelled()
boolean isSuspended()
AtmosphereResource.suspend() has been
invoked and set to trueAtmosphereResource.suspend() has been
invoked and set to trueboolean isResuming()
AtmosphereResource.resume() has been
invokedAtmosphereResource.resume() has been
invoked and set to trueAtmosphereResource getResource()
AtmosphereResource associated with this eventAtmosphereResourceAtmosphereResourceEvent write(java.io.OutputStream os, java.lang.Object o) throws java.io.IOException
Object using the OutputStream by invoking
the current Serializer. If Serializer is null, the Object
will be directly written using the AtmosphereResponse.getOutputStream()os - OutputStreamo - Objectjava.io.IOExceptionjava.lang.Throwable throwable()
Throwable if an unexpected exception occured.Throwable if an unexpected exception occured.AtmosphereResourceEvent write(byte[] o) throws java.io.IOException
byte using the underlying AtmosphereResponse.getOutputStream()o - bytejava.io.IOExceptionBroadcaster broadcaster()
AtmosphereResource this object contains.Copyright © 2018. All Rights Reserved.