Interface OutboundHeaders<A extends OutboundHeaders<A>>

Type Parameters:
A - the outbound headers type
All Superinterfaces:
InboundHeaders
All Known Subinterfaces:
OutboundRequestHeaders, OutboundResponseHeaders

public interface OutboundHeaders<A extends OutboundHeaders<A>> extends InboundHeaders

Represents mutable outbound HTTP headers.

Author:
Jeremy Kuhn
  • Method Details

    • isWritten

      boolean isWritten()

      Determines whether the headers have been sent to the recipient.

      Any attempts to specify new headers once headers have been sent, will result in an IllegalStateException being thrown.

      Returns:
      true if the headers have been sent, false otherwise
    • add

      A add(CharSequence name, CharSequence value)

      Adds a header with the specified name and value.

      Parameters:
      name - the header name
      value - the header value
      Returns:
      the outbound headers
    • addParameter

      <T> A addParameter(CharSequence name, T value)

      Encodes and adds a header with the specified name and value

      Type Parameters:
      T - the value type
      Parameters:
      name - the header name
      value - the header value
      Returns:
      the outbound headers
    • addParameter

      default <T> A addParameter(CharSequence name, T value, Class<T> type)

      Encodes and adds a header with the specified name and value

      Type Parameters:
      T - the value type
      Parameters:
      name - the header name
      value - the header value
      type - the value type
      Returns:
      the outbound headers
    • addParameter

      <T> A addParameter(CharSequence name, T value, Type type)

      Encodes and adds a header with the specified name and value

      Type Parameters:
      T - the value type
      Parameters:
      name - the header name
      value - the header value
      type - the value type
      Returns:
      the outbound headers
    • add

      A add(Header... headers)

      Adds the specified headers.

      Parameters:
      headers - the headers to add
      Returns:
      the outbound headers
    • set

      A set(CharSequence name, CharSequence value)

      Sets the value of the header with the specified name.

      Parameters:
      name - the header name
      value - the header value
      Returns:
      the outbound headers
    • setParameter

      <T> A setParameter(CharSequence name, T value)

      Encodes and sets the value of the header with the specified name.

      Type Parameters:
      T - the value type
      Parameters:
      name - the header name
      value - the header value
      Returns:
      the outbound headers
    • setParameter

      default <T> A setParameter(CharSequence name, T value, Class<T> type)

      Encodes and sets the value of the header with the specified name.

      Type Parameters:
      T - the value type
      Parameters:
      name - the header name
      value - the header value
      type - the value type
      Returns:
      the outbound headers
    • setParameter

      <T> A setParameter(CharSequence name, T value, Type type)

      Encodes and sets the value of the header with the specified name.

      Type Parameters:
      T - the value type
      Parameters:
      name - the header name
      value - the header value
      type - the value type
      Returns:
      the outbound headers
    • set

      A set(Header... headers)

      Sets the specified headers.

      Parameters:
      headers - the headers to set
      Returns:
      the outbound headers
    • remove

      A remove(CharSequence... names)

      Removes the headers with the specified names.

      Parameters:
      names - the names of the headers to remove
      Returns:
      the outbound headers