Modifier and Type | Field and Description |
---|---|
static String |
DISABLE_SSE
If
true then SSE Feature automatic registration is
suppressed. |
static String |
DISABLE_SSE_CLIENT
Client-side variant of
DISABLE_SSE property. |
static String |
DISABLE_SSE_SERVER
Server-side variant of
DISABLE_SSE property. |
static String |
LAST_EVENT_ID_HEADER
"Last-Event-ID" HTTP request header name as defined by
SSE specification. |
static long |
RECONNECT_NOT_SET
A "reconnection not set" value for the SSE reconnect delay set via
retry field. |
static String |
SERVER_SENT_EVENTS
String representation of Server sent events media type. |
static MediaType |
SERVER_SENT_EVENTS_TYPE
Server sent events media type.
|
Constructor and Description |
---|
SseFeature() |
Modifier and Type | Method and Description |
---|---|
boolean |
configure(FeatureContext context)
A call-back method called when the feature is to be enabled in a given
runtime configuration scope.
|
public static final String SERVER_SENT_EVENTS
String
representation of Server sent events media type. (""text/event-stream"").public static final MediaType SERVER_SENT_EVENTS_TYPE
public static final String DISABLE_SSE
true
then SSE Feature
automatic registration is
suppressed.
Since Jersey 2.8, by default SSE Feature is automatically enabled when the SSE module is on class path.
You can override this behavior by setting this property to true
.
The value of this property may be specifically overridden on either client or server side by setting the
client
or server
variant of this property.
The default value is false
.
The name of the configuration property is "jersey.config.media.sse.disable".
public static final String DISABLE_SSE_CLIENT
DISABLE_SSE
property.
The default value is false
.
The name of the configuration property is "jersey.config.client.media.sse.disable".
public static final String DISABLE_SSE_SERVER
DISABLE_SSE
property.
The default value is false
.
The name of the configuration property is "jersey.config.server.media.sse.disable".
public static final long RECONNECT_NOT_SET
retry
field.public static final String LAST_EVENT_ID_HEADER
"Last-Event-ID"
HTTP request header name as defined by
SSE specification.public boolean configure(FeatureContext context)
Feature
true
if the feature was successfully enabled or false
otherwise.
Note that under some circumstances the feature may decide not to enable itself, which
is indicated by returning false
. In such case the configuration context does
not add the feature to the collection of enabled features and a subsequent call to
Configuration.isEnabled(Feature)
or Configuration.isEnabled(Class)
method
would return false
.
Copyright © 2007-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.