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. This resource will be closed/released once the entity is fully read, depending on keep alive configuration.
      Returns:
      connection resource
    • 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