public interface AtmosphereResourceEvent
Broadcaster.broadcast(java.lang.Object)
is executed, when a browser remotely closes the connection or
when a suspended resource times out or gets resumed. When such events occur, 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. |
Object |
getMessage()
Return the object that was passed 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 |
isClosedByApplication()
Return true if the application closed the connection using
AtmosphereResource.close() . |
boolean |
isClosedByClient()
Return true if the client closed the connection and send the Atmosphere close message.
|
boolean |
isResumedOnTimeout()
Return true is the response gets resumed after a timeout.
|
boolean |
isResuming()
Return true if
AtmosphereResource.resume() has been invoked. |
boolean |
isSuspended()
Return true if
AtmosphereResource.suspend() has been invoked and set to true. |
AtmosphereResourceEvent |
setMessage(Object o)
Set an Object that can be retrieved with
getMessage() . |
Throwable |
throwable()
Return a
Throwable if an unexpected exception occured. |
Object getMessage()
Broadcaster.broadcast(java.lang.Object)
.Broadcaster.broadcast(java.lang.Object)
AtmosphereResourceEvent setMessage(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 true.AtmosphereResource.suspend()
has been invoked and set to trueboolean isResuming()
AtmosphereResource.resume()
has been invoked.AtmosphereResource.resume()
has been invoked and set to trueAtmosphereResource getResource()
AtmosphereResource
associated with this event.AtmosphereResource
boolean isClosedByClient()
OnDisconnectInterceptor
in order to receive the proper value,
and atmosphereProtocol must be set to true on the client side (enabledProtocol is true by default).boolean isClosedByApplication()
AtmosphereResource.close()
.Throwable throwable()
Throwable
if an unexpected exception occured.Throwable
if an unexpected exception occured.Broadcaster broadcaster()
AtmosphereResource
this object contains.Copyright © 2016. All rights reserved.