- All Superinterfaces:
Prototype.Api
- All Known Implementing Classes:
WebClientServiceResponse.BuilderBase.WebClientServiceResponseImpl
Response which is created upon receiving of server response.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forWebClientServiceResponse
.static class
WebClientServiceResponse.BuilderBase<BUILDER extends WebClientServiceResponse.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends WebClientServiceResponse> Fluent API builder base forWebClientServiceResponse
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a new fluent API builder to customize configuration.builder
(WebClientServiceResponse instance) Create a new fluent API builder from an existing instance.Client connection/stream that was used to handle this request.static WebClientServiceResponse
create()
Create a new instance with default values.headers()
Received response headers.Input stream to get data of the entity.The service request used to invoke the final call.status()
Status of the response.trailers()
Received response trailer headers.Completable future to be completed by the client response when the entity is fully read.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance with default values.- Returns:
- a new instance
-
headers
ClientResponseHeaders headers()Received response headers.- Returns:
- immutable response headers
-
trailers
CompletableFuture<ClientResponseTrailers> trailers()Received response trailer headers.- Returns:
- immutable response trailer headers
-
status
Status status()Status of the response.- Returns:
- response status
-
inputStream
Optional<InputStream> inputStream()Input stream to get data of the entity. This allows decorating the entity (such as decryption). The status, headers are always already read, and the input stream will not provide transfer encoded bytes (e.g. the bytes in the input stream are the entity bytes, regardless of how it is encoded over HTTP).- Returns:
- entity input stream, or empty, if there is no entity
-
connection
ReleasableResource connection()Client connection/stream that was used to handle this request. This resource will be closed/released once the entity is fully read, depending on keep alive configuration.- Returns:
- connection resource
-
whenComplete
CompletableFuture<WebClientServiceResponse> whenComplete()Completable future to be completed by the client response when the entity is fully read.- Returns:
- completable future to be finished by the client response
-
serviceRequest
WebClientServiceRequest serviceRequest()The service request used to invoke the final call.- Returns:
- service request
-