Interface HttpServerResponse

All Superinterfaces:
org.refcodes.mixin.Dumpable, HeaderFieldsAccessor<ResponseHeaderFields>, HttpBodyAccessor.HttpBodyProvider<BadResponseException>, HttpResponse, HttpStatusCodeAccessor, HttpStatusCodeAccessor.HttpStatusCodeBuilder<HttpServerResponse>, HttpStatusCodeAccessor.HttpStatusCodeMutator, HttpStatusCodeAccessor.HttpStatusCodeProperty
All Known Implementing Classes:
HttpServerResponseImpl

public interface HttpServerResponse
extends HttpResponse, HttpStatusCodeAccessor.HttpStatusCodeProperty, HttpStatusCodeAccessor.HttpStatusCodeBuilder<HttpServerResponse>, HttpBodyAccessor.HttpBodyProvider<BadResponseException>, org.refcodes.mixin.Dumpable
Defines a HttpServerResponse as produced by the server.
  • Method Details

    • withHttpStatusCode

      default HttpServerResponse withHttpStatusCode​(HttpStatusCode aStatusCode)
      Sets the HTTP Status-Code for the HTTP Status-Code property.
      Specified by:
      withHttpStatusCode in interface HttpStatusCodeAccessor.HttpStatusCodeBuilder<HttpServerResponse>
      Parameters:
      aStatusCode - The HTTP Status-Code to be stored by the HTTP HTTP Status-Code property.
      Returns:
      The builder for applying multiple build operations.
    • getResponse

      <RES> RES getResponse()
      Retrieves the response from the response property.
      Type Parameters:
      RES - the generic type
      Returns:
      The response stored by the response property.
    • setResponse

      <RES> void setResponse​(RES aResponse)
      Sets the response for the response property. The HttpServerResponseImpl.setResponse(Object) supports the HttpBodyMap to marshal an HttpBodyMap into an HTTP Request-Body.
      Type Parameters:
      RES - the generic type
      Parameters:
      aResponse - The response to be stored by the response property.
    • withResponse

      default <RES> HttpServerResponse withResponse​(RES aResponse)
      Sets the response for the response property.
      Type Parameters:
      RES - the generic type
      Parameters:
      aResponse - The response to be stored by the response property.
      Returns:
      The builder for applying multiple build operations.