E - the typepublic class SuspendResponse<E>
extends com.sun.jersey.api.JResponse
Suspend
annotation.
SuspendResponse<String> r = new SuspendResponse.SuspendResponseBuilder<String>()
.broadcaster(broadcaster)
.outputComments(true)
.period(5, TimeUnit.SECONDS)
.entity("foo")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
SuspendResponse.SuspendResponseBuilder<E>
A Builder for
SuspendResponse |
static class |
SuspendResponse.TimeSpan
Util class that encapsulate a period and a TimeUnit.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SuspendResponse(SuspendResponse.SuspendResponseBuilder<E> b) |
| Modifier and Type | Method and Description |
|---|---|
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. |
boolean |
writeEntity()
Write the returned entity back to the calling connection.
|
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, toResponseprotected SuspendResponse(SuspendResponse.SuspendResponseBuilder<E> b)
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 boolean writeEntity()
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.Copyright © 2016. All rights reserved.