| Package | Description |
|---|---|
| com.linecorp.armeria.common.sse |
Server-Sent Events support.
|
| com.linecorp.armeria.server.streaming |
Supports streaming responses from
Publisher or Stream. |
| Modifier and Type | Method and Description |
|---|---|
ServerSentEvent |
ServerSentEventBuilder.build()
Creates a new
ServerSentEvent instance. |
static ServerSentEvent |
ServerSentEvent.empty()
Returns a singleton empty
ServerSentEvent. |
static ServerSentEvent |
ServerSentEvent.ofComment(String comment)
Creates a new
ServerSentEvent with the specified comment. |
static ServerSentEvent |
ServerSentEvent.ofData(String data)
Creates a new
ServerSentEvent with the specified data. |
static ServerSentEvent |
ServerSentEvent.ofEvent(String event)
Creates a new
ServerSentEvent with the specified event. |
static ServerSentEvent |
ServerSentEvent.ofId(String id)
Creates a new
ServerSentEvent with the specified id. |
static ServerSentEvent |
ServerSentEvent.ofRetry(Duration retry)
Creates a new
ServerSentEvent with the specified retry. |
| Modifier and Type | Method and Description |
|---|---|
static HttpResponse |
ServerSentEvents.fromEvent(ResponseHeaders headers,
ServerSentEvent sse)
Creates a new Server-Sent Events stream of the specified
content. |
static HttpResponse |
ServerSentEvents.fromEvent(ResponseHeaders headers,
ServerSentEvent sse,
HttpHeaders trailers)
Creates a new Server-Sent Events stream of the specified
content. |
static HttpResponse |
ServerSentEvents.fromEvent(ServerSentEvent sse)
Creates a new Server-Sent Events stream of the specified
content. |
| Modifier and Type | Method and Description |
|---|---|
static HttpResponse |
ServerSentEvents.fromPublisher(org.reactivestreams.Publisher<? extends ServerSentEvent> contentPublisher)
Creates a new Server-Sent Events stream from the specified
Publisher. |
static <T> HttpResponse |
ServerSentEvents.fromPublisher(org.reactivestreams.Publisher<T> contentPublisher,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Publisher and converter. |
static HttpResponse |
ServerSentEvents.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<? extends ServerSentEvent> contentPublisher)
Creates a new Server-Sent Events stream from the specified
Publisher. |
static HttpResponse |
ServerSentEvents.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<? extends ServerSentEvent> contentPublisher,
HttpHeaders trailers)
Creates a new Server-Sent Events stream from the specified
Publisher. |
static <T> HttpResponse |
ServerSentEvents.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<T> contentPublisher,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Publisher and converter. |
static <T> HttpResponse |
ServerSentEvents.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<T> contentPublisher,
HttpHeaders trailers,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Publisher and converter. |
static HttpResponse |
ServerSentEvents.fromStream(ResponseHeaders headers,
Stream<? extends ServerSentEvent> contentStream,
Executor executor)
Creates a new Server-Sent Events stream from the specified
Stream. |
static HttpResponse |
ServerSentEvents.fromStream(ResponseHeaders headers,
Stream<? extends ServerSentEvent> contentStream,
HttpHeaders trailers,
Executor executor)
Creates a new Server-Sent Events stream from the specified
Stream. |
static <T> HttpResponse |
ServerSentEvents.fromStream(ResponseHeaders headers,
Stream<T> contentStream,
Executor executor,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Stream and converter. |
static <T> HttpResponse |
ServerSentEvents.fromStream(ResponseHeaders headers,
Stream<T> contentStream,
HttpHeaders trailers,
Executor executor,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Stream and converter. |
static HttpResponse |
ServerSentEvents.fromStream(Stream<? extends ServerSentEvent> contentStream,
Executor executor)
Creates a new Server-Sent Events stream from the specified
Stream. |
static <T> HttpResponse |
ServerSentEvents.fromStream(Stream<T> contentStream,
Executor executor,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Stream and converter. |
Copyright © 2020 LeanCloud. All rights reserved.