Flux<ServerSentEvent> or Observable<ServerSentEvent> is the
reactive equivalent to Spring MVC's SseEmitter.
ServerSentEventHttpMessageWriter, Server-Sent Events W3C recommendation
| Modifier and Type | Class and Description |
|---|---|
| public static interface | ServerSentEvent.Builder<
the type of data that this event contains T>A mutable builder for a |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final T | |
| private final String | |
| private final String | |
| private final Duration |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static < the type of data that this event contains T> ServerSentEvent. | |
| public static < the type of data that this event contains T> ServerSentEvent. | |
| public String | |
| public T | |
| public String | |
| public String | |
| public Duration | |
| public String |
| comment | back to summary |
|---|---|
| private final String comment
| |
| data | back to summary |
|---|---|
| private final T data
| |
| event | back to summary |
|---|---|
| private final String event
| |
| id | back to summary |
|---|---|
| private final String id
| |
| retry | back to summary |
|---|---|
| private final Duration retry
| |
| ServerSentEvent | back to summary |
|---|---|
| private ServerSentEvent(String id, String event, Duration retry, String comment, T data) | |
| builder | back to summary |
|---|---|
| public static <T> ServerSentEvent. Return a builder for a
| |
| builder | back to summary |
|---|---|
| public static <T> ServerSentEvent. Return a builder for a
| |
| comment | back to summary |
|---|---|
| public String comment() Return the comment of this event, if available.
| |
| data | back to summary |
|---|---|
| public T data() Return the
| |
| event | back to summary |
|---|---|
| public String event() Return the
| |
| id | back to summary |
|---|---|
| public String id() Return the
| |
| retry | back to summary |
|---|---|
| public Duration retry() Return the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
SseEvent.
| Modifier and Type | Method and Description |
|---|---|
| public ServerSentEvent | |
| public ServerSentEvent. | |
| public ServerSentEvent. | |
| public ServerSentEvent. | |
| public ServerSentEvent. | |
| public ServerSentEvent. |
| build | back to summary |
|---|---|
| public ServerSentEvent Builds the event.
| |
| comment | back to summary |
|---|---|
| public ServerSentEvent. Set SSE comment. If a multi-line comment is provided, it will be turned into multiple SSE comment lines as defined in Server-Sent Events W3C recommendation.
| |
| data | back to summary |
|---|---|
| public ServerSentEvent. Set the value of the
| |
| event | back to summary |
|---|---|
| public ServerSentEvent. Set the value of the
| |
| id | back to summary |
|---|---|
| public ServerSentEvent. Set the value of the
| |
| retry | back to summary |
|---|---|
| public ServerSentEvent. Set the value of the
| |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private T | |
| private String | |
| private String | |
| private Duration |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ServerSentEvent | |
| public ServerSentEvent. | comment(String
the comment to set comment)Implements org. |
| public ServerSentEvent. | data(T
the value of the data field data)Implements org. data field.
|
| public ServerSentEvent. | event(String
the value of the event field event)Implements org. event field.
|
| public ServerSentEvent. | id(String
the value of the id field id)Implements org. id field.
|
| public ServerSentEvent. | retry(Duration
the value of the retry field retry)Implements org. retry field.
|
| comment | back to summary |
|---|---|
| private String comment
| |
| data | back to summary |
|---|---|
| private T data
| |
| event | back to summary |
|---|---|
| private String event
| |
| id | back to summary |
|---|---|
| private String id
| |
| retry | back to summary |
|---|---|
| private Duration retry
| |
| BuilderImpl | back to summary |
|---|---|
| public BuilderImpl() | |
| BuilderImpl | back to summary |
|---|---|
| public BuilderImpl(T data) | |
| build | back to summary |
|---|---|
| public ServerSentEvent Implements org. Doc from org. Builds the event.
| |
| comment | back to summary |
|---|---|
| public ServerSentEvent. Implements org. Doc from org. Set SSE comment. If a multi-line comment is provided, it will be turned into multiple SSE comment lines as defined in Server-Sent Events W3C recommendation.
| |
| data | back to summary |
|---|---|
| public ServerSentEvent. Implements org. Doc from org. Set the value of the
| |
| event | back to summary |
|---|---|
| public ServerSentEvent. Implements org. Doc from org. Set the value of the
| |
| id | back to summary |
|---|---|
| public ServerSentEvent. Implements org. Doc from org. Set the value of the
| |
| retry | back to summary |
|---|---|
| public ServerSentEvent. Implements org. Doc from org. Set the value of the
| |