public class AtmosphereResourceEventImpl extends Object implements AtmosphereResourceEvent
AtmosphereResourceEvent
implementation.Modifier and Type | Field and Description |
---|---|
protected Object |
message |
protected AtmosphereResourceImpl |
resource |
Constructor and Description |
---|
AtmosphereResourceEventImpl(AtmosphereResourceImpl resource) |
AtmosphereResourceEventImpl(AtmosphereResourceImpl resource,
boolean isCancelled,
boolean isResumedOnTimeout) |
AtmosphereResourceEventImpl(AtmosphereResourceImpl resource,
boolean isCancelled,
boolean isResumedOnTimeout,
boolean isClosedByClient,
Throwable throwable) |
AtmosphereResourceEventImpl(AtmosphereResourceImpl resource,
boolean isCancelled,
boolean isResumedOnTimeout,
Throwable throwable) |
Modifier and Type | Method and Description |
---|---|
Broadcaster |
broadcaster()
Return the broadcaster associated with the
AtmosphereResource this object contains. |
AtmosphereResourceEvent |
destroy() |
boolean |
equals(Object o) |
Object |
getMessage()
Return the object that was passed to
Broadcaster.broadcast(java.lang.Object) . |
AtmosphereResource |
getResource()
Return the
AtmosphereResource associated with this event. |
int |
hashCode() |
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.
|
AtmosphereResourceEventImpl |
isClosedByClient(boolean isClosedByClient) |
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. |
AtmosphereResourceEventImpl |
setCancelled(boolean isCancelled) |
AtmosphereResourceEventImpl |
setCloseByApplication(boolean b) |
protected AtmosphereResourceEventImpl |
setIsResumedOnTimeout(boolean isResumedOnTimeout) |
AtmosphereResourceEventImpl |
setMessage(Object message)
Set an Object that can be retrieved with
AtmosphereResourceEvent.getMessage() . |
AtmosphereResourceEvent |
setThrowable(Throwable t) |
Throwable |
throwable()
Return a
Throwable if an unexpected exception occured. |
String |
toString() |
protected Object message
protected AtmosphereResourceImpl resource
public AtmosphereResourceEventImpl(AtmosphereResourceImpl resource)
public AtmosphereResourceEventImpl(AtmosphereResourceImpl resource, boolean isCancelled, boolean isResumedOnTimeout)
public AtmosphereResourceEventImpl(AtmosphereResourceImpl resource, boolean isCancelled, boolean isResumedOnTimeout, Throwable throwable)
public AtmosphereResourceEventImpl(AtmosphereResourceImpl resource, boolean isCancelled, boolean isResumedOnTimeout, boolean isClosedByClient, Throwable throwable)
public boolean isResuming()
AtmosphereResourceEvent
AtmosphereResource.resume()
has been invoked.isResuming
in interface AtmosphereResourceEvent
AtmosphereResource.resume()
has been invoked and set to truepublic boolean isSuspended()
AtmosphereResourceEvent
AtmosphereResource.suspend()
has been invoked and set to true.isSuspended
in interface AtmosphereResourceEvent
AtmosphereResource.suspend()
has been invoked and set to truepublic boolean isClosedByClient()
AtmosphereResourceEvent
OnDisconnectInterceptor
in order to receive the proper value,
and atmosphereProtocol must be set to true on the client side (enabledProtocol is true by default).isClosedByClient
in interface AtmosphereResourceEvent
public boolean isClosedByApplication()
AtmosphereResourceEvent
AtmosphereResource.close()
.isClosedByApplication
in interface AtmosphereResourceEvent
public AtmosphereResourceEventImpl setCloseByApplication(boolean b)
public Object getMessage()
AtmosphereResourceEvent
Broadcaster.broadcast(java.lang.Object)
.getMessage
in interface AtmosphereResourceEvent
Broadcaster.broadcast(java.lang.Object)
public AtmosphereResourceEventImpl setMessage(Object message)
AtmosphereResourceEvent
AtmosphereResourceEvent.getMessage()
. Note that the value may be overridden when
Broadcaster.broadcast(java.lang.Object)
gets invoked.setMessage
in interface AtmosphereResourceEvent
message
- an Object that can be retrieved with AtmosphereResourceEvent.getMessage()
.public AtmosphereResourceEventImpl isClosedByClient(boolean isClosedByClient)
public boolean isResumedOnTimeout()
AtmosphereResourceEvent
isResumedOnTimeout
in interface AtmosphereResourceEvent
public boolean isCancelled()
AtmosphereResourceEvent
isCancelled
in interface AtmosphereResourceEvent
public AtmosphereResourceEventImpl setCancelled(boolean isCancelled)
protected AtmosphereResourceEventImpl setIsResumedOnTimeout(boolean isResumedOnTimeout)
public Throwable throwable()
AtmosphereResourceEvent
Throwable
if an unexpected exception occured.throwable
in interface AtmosphereResourceEvent
Throwable
if an unexpected exception occured.public Broadcaster broadcaster()
AtmosphereResourceEvent
AtmosphereResource
this object contains.broadcaster
in interface AtmosphereResourceEvent
public AtmosphereResource getResource()
AtmosphereResourceEvent
AtmosphereResource
associated with this event.getResource
in interface AtmosphereResourceEvent
AtmosphereResource
public AtmosphereResourceEvent setThrowable(Throwable t)
public AtmosphereResourceEvent destroy()
Copyright © 2016. All rights reserved.