Interface WebClientServiceResponse

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
WebClientServiceResponse.BuilderBase.WebClientServiceResponseImpl

public interface WebClientServiceResponse extends Prototype.Api
Response which is created upon receiving of server response.
See Also:
  • 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

      static WebClientServiceResponse create()
      Create a new instance with default values.
      Returns:
      a new instance
    • headers

      Received response headers.
      Returns:
      immutable response headers
    • 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. The client implementation manages this resource and decides whether to release it for reuse or close it.
      Returns:
      connection resource
    • whenComplete

      Completable future used by the client implementation to report that response processing has completed. The exact completion point is protocol-specific and may follow a full entity read, explicit response close, or an entity-processing failure. Normal completion does not imply that the entity was fully read successfully.
      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