io.helidon.common.reactive.Flow.Subscriber<ResponseChunk>public interface BareResponse extends io.helidon.common.reactive.Flow.Subscriber<ResponseChunk>
| Modifier and Type | Method | Description |
|---|---|---|
void |
onComplete() |
Response should be flushed and closed.
|
void |
onError(java.lang.Throwable thr) |
Response should be flushed and closed.
|
void |
onNext(ResponseChunk data) |
Provided
ByteBuffer MUST be fully read during the method call. |
void |
onSubscribe(io.helidon.common.reactive.Flow.Subscription subscription) |
Each response is subscribed up to a single publisher and AFTER
writeStatusAndHeaders(Http.ResponseStatus, Map)
method is called and returned. |
long |
requestId() |
A unique correlation ID that is associated with this response and its associated request.
|
java.util.concurrent.CompletionStage<BareResponse> |
whenCompleted() |
Returns a
CompletionStage of this response. |
java.util.concurrent.CompletionStage<BareResponse> |
whenHeadersCompleted() |
Returns a
CompletionStage of headers part of this response. |
void |
writeStatusAndHeaders(Http.ResponseStatus status,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers) |
Send response line and headers to the client.
|
void writeStatusAndHeaders(Http.ResponseStatus status, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers) throws SocketClosedException, java.lang.NullPointerException
status - an HTTP statusheaders - a Map of header names and valuesSocketClosedException - if headers were already send or response is closedjava.lang.NullPointerException - if status is nulljava.util.concurrent.CompletionStage<BareResponse> whenHeadersCompleted()
CompletionStage of headers part of this response. The stage is completed when all headers are sent to
the client.java.util.concurrent.CompletionStage<BareResponse> whenCompleted()
CompletionStage of this response. The stage is completed when all response data are sent or response
channel is finished.void onSubscribe(io.helidon.common.reactive.Flow.Subscription subscription)
writeStatusAndHeaders(Http.ResponseStatus, Map)
method is called and returned.onSubscribe in interface io.helidon.common.reactive.Flow.Subscriber<ResponseChunk>subscription - a subscription.void onNext(ResponseChunk data) throws SocketClosedException
ByteBuffer MUST be fully read during the method call.onNext in interface io.helidon.common.reactive.Flow.Subscriber<ResponseChunk>data - chunk of the response payloadSocketClosedException - if response is already closedvoid onError(java.lang.Throwable thr)
This method can be called without a subscription or demand. HTTP IO must be able to handle it.
onError in interface io.helidon.common.reactive.Flow.Subscriber<ResponseChunk>thr - an error.void onComplete()
This method can be called without a subscription or demand. HTTP IO must be able to handle it.
onComplete in interface io.helidon.common.reactive.Flow.Subscriber<ResponseChunk>long requestId()
Copyright © 2018 Oracle Corporation. All rights reserved.