public class AtmosphereResourceEventImpl extends java.lang.Object implements AtmosphereResourceEvent
AtmosphereResourceEvent implementation for Servlet Container.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.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,
java.lang.Throwable throwable) |
| Modifier and Type | Method and Description |
|---|---|
Broadcaster |
broadcaster()
Return the broadcaster associated with the
AtmosphereResource this object contains. |
AtmosphereResourceEvent |
destroy() |
boolean |
equals(java.lang.Object o) |
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 |
int |
hashCode() |
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 |
protected AtmosphereResourceEvent |
setCancelled(boolean isCancelled) |
protected AtmosphereResourceEvent |
setIsResumedOnTimeout(boolean isResumedOnTimeout) |
AtmosphereResourceEvent |
setMessage(java.lang.Object message)
Set the message broadcasted using
Broadcaster.broadcast(java.lang.Object) |
AtmosphereResourceEvent |
setThrowable(java.lang.Throwable t) |
java.lang.Throwable |
throwable()
Return a
Throwable if an unexpected exception occured. |
java.lang.String |
toString() |
AtmosphereResourceEvent |
write(byte[] o)
Write the
byte using the underlying AtmosphereResponse.getOutputStream() |
AtmosphereResourceEvent |
write(java.io.OutputStream os,
java.lang.Object o)
|
protected java.lang.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, java.lang.Throwable throwable)
public boolean isResuming()
AtmosphereResource.resume() has been
invokedisResuming in interface AtmosphereResourceEventAtmosphereResource.resume() has been
invoked and set to truepublic boolean isSuspended()
AtmosphereResource.suspend() has been
invoked and set to trueisSuspended in interface AtmosphereResourceEventAtmosphereResource.suspend() has been
invoked and set to truepublic java.lang.Object getMessage()
Broadcaster.broadcast(java.lang.Object)getMessage in interface AtmosphereResourceEventBroadcaster.broadcast(java.lang.Object)public AtmosphereResourceEvent setMessage(java.lang.Object message)
Broadcaster.broadcast(java.lang.Object)setMessage in interface AtmosphereResourceEventmessage - The message broadcasted using Broadcaster.broadcast(java.lang.Object)public boolean isResumedOnTimeout()
isResumedOnTimeout in interface AtmosphereResourceEventpublic boolean isCancelled()
isCancelled in interface AtmosphereResourceEventprotected AtmosphereResourceEvent setCancelled(boolean isCancelled)
protected AtmosphereResourceEvent setIsResumedOnTimeout(boolean isResumedOnTimeout)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Throwable throwable()
Throwable if an unexpected exception occured.throwable in interface AtmosphereResourceEventThrowable if an unexpected exception occured.public AtmosphereResourceEvent write(byte[] o) throws java.io.IOException
byte using the underlying AtmosphereResponse.getOutputStream()write in interface AtmosphereResourceEvento - bytejava.io.IOExceptionpublic Broadcaster broadcaster()
AtmosphereResource this object contains.broadcaster in interface AtmosphereResourceEventpublic AtmosphereResource getResource()
AtmosphereResource associated with this eventgetResource in interface AtmosphereResourceEventAtmosphereResourcepublic AtmosphereResourceEvent 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()write in interface AtmosphereResourceEventos - OutputStreamo - Objectjava.io.IOExceptionpublic AtmosphereResourceEvent setThrowable(java.lang.Throwable t)
public AtmosphereResourceEvent destroy()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018. All Rights Reserved.