@Target(value=METHOD) @Retention(value=RUNTIME) @Documented public @interface Suspend
Broadcast
events, depending on the scope ([@link Suspend#SCOPE}).
By default, a suspended response is suspended able to consume
any broadcasted events executed inside the same application (SCOPE.APPLICATION).
The period can also be per suspended response (SCOPE.REQUEST) or available to other
application (SCOPE.VM).Modifier and Type | Optional Element and Description |
---|---|
String |
contentType
If the @Produces annotation is missing, this value will be used instead.
|
Class<? extends AtmosphereResourceEventListener>[] |
listeners
Add
AtmosphereResourceEventListener to track internal events. |
boolean |
outputComments
Deprecated.
|
int |
period
How long a response stay suspended in
timeUnit() , default is -1 |
boolean |
resumeOnBroadcast
Resume all suspended response on the first broadcast operation.
|
Suspend.SCOPE |
scope
The Scope of the
Broadcaster that will be created once the
response gets suspended. |
TimeUnit |
timeUnit |
boolean |
writeEntity
Write the returned entity back to the calling connection.
|
public abstract int period
timeUnit()
, default is -1public abstract TimeUnit timeUnit
public abstract Suspend.SCOPE scope
Broadcaster
that will be created once the
response gets suspended. One final word on Broadcaster: by default,
a Broadcaster will broadcast using
all resources/classes on which the response has been suspended.
This behavior is configurable and you can configure it setting the appropriate scopeBroadcaster
that will be created once the
response gets suspended.@Deprecated public abstract boolean outputComments
public abstract boolean resumeOnBroadcast
public abstract Class<? extends AtmosphereResourceEventListener>[] listeners
AtmosphereResourceEventListener
to track internal events.public abstract boolean writeEntity
public abstract String contentType
Copyright © 2016. All rights reserved.