|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.atmosphere.cpr.AtmosphereResourceEventImpl
public class AtmosphereResourceEventImpl
AtmosphereResourceEvent implementation for Servlet Container.
| Field Summary | |
|---|---|
protected Object |
message
|
protected AtmosphereResourceImpl |
resource
|
| Constructor Summary | |
|---|---|
AtmosphereResourceEventImpl(AtmosphereResourceImpl resource)
|
|
AtmosphereResourceEventImpl(AtmosphereResourceImpl resource,
boolean isCancelled,
boolean isResumedOnTimeout)
|
|
AtmosphereResourceEventImpl(AtmosphereResourceImpl resource,
boolean isCancelled,
boolean isResumedOnTimeout,
Throwable throwable)
|
|
| Method Summary | |
|---|---|
Broadcaster |
broadcaster()
Return the broadcaster associated with the AtmosphereResource this object contains. |
AtmosphereResourceEvent |
destroy()
|
boolean |
equals(Object o)
|
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(Object message)
Set the message broadcasted using Broadcaster.broadcast(java.lang.Object) |
AtmosphereResourceEvent |
setThrowable(Throwable t)
|
Throwable |
throwable()
Return a Throwable if an unexpected exception occured. |
String |
toString()
|
AtmosphereResourceEvent |
write(byte[] o)
Write the byte using the underlying AtmosphereResponse.getOutputStream() |
AtmosphereResourceEvent |
write(OutputStream os,
Object o)
Write the Object using the OutputStream by invoking
the current Serializer. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Object message
protected AtmosphereResourceImpl resource
| Constructor Detail |
|---|
public AtmosphereResourceEventImpl(AtmosphereResourceImpl resource)
public AtmosphereResourceEventImpl(AtmosphereResourceImpl resource,
boolean isCancelled,
boolean isResumedOnTimeout)
public AtmosphereResourceEventImpl(AtmosphereResourceImpl resource,
boolean isCancelled,
boolean isResumedOnTimeout,
Throwable throwable)
| Method Detail |
|---|
public boolean isResuming()
AtmosphereResource.resume() has been
invoked
isResuming in interface AtmosphereResourceEventAtmosphereResource.resume() has been
invoked and set to truepublic boolean isSuspended()
AtmosphereResource.suspend() has been
invoked and set to true
isSuspended in interface AtmosphereResourceEventAtmosphereResource.suspend() has been
invoked and set to truepublic Object getMessage()
Broadcaster.broadcast(java.lang.Object)
getMessage in interface AtmosphereResourceEventBroadcaster.broadcast(java.lang.Object)public AtmosphereResourceEvent setMessage(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(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic Throwable throwable()
Throwable if an unexpected exception occured.
throwable in interface AtmosphereResourceEventThrowable if an unexpected exception occured.
public AtmosphereResourceEvent write(byte[] o)
throws IOException
byte using the underlying AtmosphereResponse.getOutputStream()
write in interface AtmosphereResourceEvento - byte
IOExceptionpublic Broadcaster broadcaster()
AtmosphereResource this object contains.
broadcaster in interface AtmosphereResourceEventpublic AtmosphereResource getResource()
AtmosphereResource associated with this event
getResource in interface AtmosphereResourceEventAtmosphereResource
public AtmosphereResourceEvent write(OutputStream os,
Object o)
throws 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 - Object
IOExceptionpublic AtmosphereResourceEvent setThrowable(Throwable t)
public AtmosphereResourceEvent destroy()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||