public final class StreamingHttpResponses
extends Object
StreamingHttpResponses.| Modifier and Type | Method and Description |
|---|---|
static StreamingHttpResponse |
newResponse(HttpResponseStatus status,
HttpProtocolVersion version,
HttpHeaders headers,
BufferAllocator allocator,
HttpHeadersFactory headersFactory)
Create a new instance using HTTP 1.1 with empty payload body.
|
static StreamingHttpResponse |
newTransportResponse(HttpResponseStatus status,
HttpProtocolVersion version,
HttpHeaders headers,
BufferAllocator allocator,
Publisher<Object> messageBody,
boolean requireTrailerHeader,
HttpHeadersFactory headersFactory)
Creates a new
StreamingHttpResponse which is read from the transport. |
public static StreamingHttpResponse newResponse(HttpResponseStatus status, HttpProtocolVersion version, HttpHeaders headers, BufferAllocator allocator, HttpHeadersFactory headersFactory)
status - the HttpResponseStatus of the response.version - the HttpProtocolVersion of the response.headers - the HttpHeaders of the response.allocator - the allocator used for serialization purposes if necessary.headersFactory - HttpHeadersFactory to use.StreamingHttpResponse.public static StreamingHttpResponse newTransportResponse(HttpResponseStatus status, HttpProtocolVersion version, HttpHeaders headers, BufferAllocator allocator, Publisher<Object> messageBody, boolean requireTrailerHeader, HttpHeadersFactory headersFactory)
StreamingHttpResponse which is read from the transport. If the response contains
trailers then the passed payload
Publisher should also emit HttpHeaders before completion.status - the HttpResponseStatus of the response.version - the HttpProtocolVersion of the response.headers - the HttpHeaders of the response.allocator - the allocator used for serialization purposes if necessary.messageBody - a Publisher for payload that optionally emits HttpHeaders if the
response contains trailers.requireTrailerHeader - true if Trailer
header is required to accept trailers. false assumes trailers may be present if other criteria allows.headersFactory - HttpHeadersFactory to use.StreamingHttpResponse.