|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jersey.api.JResponse
org.atmosphere.jersey.SuspendResponse<E>
E - the typepublic class SuspendResponse<E>
This class can be used to suspend response programmatically, similar to Suspend
annotation.
SuspendResponse<String> r = new SuspendResponse.SuspendResponseBuilder<String>()
.broadcaster(broadcaster)
.outputComments(true)
.period(5, TimeUnit.SECONDS)
.entity("foo")
.build();
| Nested Class Summary | |
|---|---|
static class |
SuspendResponse.SuspendResponseBuilder<E>
A Builder for SuspendResponse |
static class |
SuspendResponse.TimeSpan
Util class that encapsulate a period and a TimeUnit. |
| Nested classes/interfaces inherited from class com.sun.jersey.api.JResponse |
|---|
com.sun.jersey.api.JResponse.AJResponseBuilder<E,B extends com.sun.jersey.api.JResponse.AJResponseBuilder>, com.sun.jersey.api.JResponse.JResponseBuilder<E> |
| Constructor Summary | |
|---|---|
protected |
SuspendResponse(SuspendResponse.SuspendResponseBuilder<E> b)
|
| Method Summary | |
|---|---|
Broadcaster |
broadcaster()
Return the Broadcaster that will be used to broadcast events. |
Collection<AtmosphereResourceEventListener> |
listeners()
Return the current list of AtmosphereResourceEventListener classes. |
boolean |
outputComments()
Tell Atmosphere to write some comments during the connection suspension. |
SuspendResponse.TimeSpan |
period()
Return the SuspendResponse.TimeSpan used to suspend the response. |
boolean |
resumeOnBroadcast()
Resume the connection on the first Broadcaster.broadcast(Object) operations. |
Suspend.SCOPE |
scope()
Return the Suspend.SCOPE value. |
| Methods inherited from class com.sun.jersey.api.JResponse |
|---|
created, fromResponse, fromResponse, getEntity, getMetadata, getStatus, getStatusType, getType, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, seeOther, serverError, status, status, status, temporaryRedirect, toResponse, toResponse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SuspendResponse(SuspendResponse.SuspendResponseBuilder<E> b)
| Method Detail |
|---|
public Suspend.SCOPE scope()
Suspend.SCOPE value.
Suspend.SCOPE value.public SuspendResponse.TimeSpan period()
SuspendResponse.TimeSpan used to suspend the response.
SuspendResponse.TimeSpan used to suspend the response.public boolean outputComments()
public boolean resumeOnBroadcast()
Broadcaster.broadcast(Object) operations.
public Broadcaster broadcaster()
Broadcaster that will be used to broadcast events.
Broadcaster that will be used to broadcast events.public Collection<AtmosphereResourceEventListener> listeners()
AtmosphereResourceEventListener classes.
AtmosphereResourceEventListener classes.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||