Package org.glassfish.jersey.media.sse
Class SseFeature
java.lang.Object
org.glassfish.jersey.media.sse.SseFeature
- All Implemented Interfaces:
Feature
A JAX-RS
feature
that enables Server-Sent Events support.- Author:
- Marek Potociar
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Iftrue
thenSSE Feature
automatic registration is suppressed.static final String
Client-side variant ofDISABLE_SSE
property.static final String
Server-side variant ofDISABLE_SSE
property.static final String
"Last-Event-ID"
HTTP request header name as defined by SSE specification.static final long
A "reconnection not set" value for the SSE reconnect delay set viaretry
field.static final String
String
representation of Server sent events media type.static final MediaType
Server sent events media type. -
Constructor Summary
-
Method Summary
-
Field Details
-
SERVER_SENT_EVENTS
String
representation of Server sent events media type. (""text/event-stream"").- See Also:
-
SERVER_SENT_EVENTS_TYPE
Server sent events media type. -
DISABLE_SSE
Iftrue
thenSSE 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 theclient
orserver
variant of this property.The default value is
false
.The name of the configuration property is "jersey.config.media.sse.disable".
- Since:
- 2.8
- See Also:
-
DISABLE_SSE_CLIENT
Client-side variant ofDISABLE_SSE
property.The default value is
false
.The name of the configuration property is "jersey.config.client.media.sse.disable".
- Since:
- 2.8
- See Also:
-
DISABLE_SSE_SERVER
Server-side variant ofDISABLE_SSE
property.The default value is
false
.The name of the configuration property is "jersey.config.server.media.sse.disable".
- Since:
- 2.8
- See Also:
-
RECONNECT_NOT_SET
public static final long RECONNECT_NOT_SETA "reconnection not set" value for the SSE reconnect delay set viaretry
field.- Since:
- 2.3
- See Also:
-
LAST_EVENT_ID_HEADER
"Last-Event-ID"
HTTP request header name as defined by SSE specification.- Since:
- 2.3
- See Also:
-
-
Constructor Details
-
SseFeature
public SseFeature()
-
-
Method Details