Class EarlyHints

All Implemented Interfaces:
HttpResponseMessage
Direct Known Subclasses:
EarlyHints.Unmodifiable

Represents an HTTP 103 Early Hints response.

Used to return some response headers before final HTTP message.

See Also:
Since:
9.2.1
  • Field Details

  • Constructor Details

    • EarlyHints

      public EarlyHints()
      Constructor.
    • EarlyHints

      public EarlyHints(HttpBody body)
      Constructor with a response body.
      Parameters:
      body - The response body. May be null.
    • EarlyHints

      public EarlyHints(String body)
      Constructor with a plain-text string body.
      Parameters:
      body - The response body as a plain-text string. May be null.
    • EarlyHints

      public EarlyHints(EarlyHints copyFrom)
      Copy constructor.
      Parameters:
      copyFrom - The bean to copy from. Must not be null.
  • Method Details

    • unmodifiable

      Description copied from class: BasicHttpResponse
      Returns an unmodifiable snapshot of this bean.

      The returned instance is a point-in-time copy of the leaf's nested Unmodifiable type; any attempt to set a property on it throws an UnsupportedOperationException. This method is idempotent: if this bean is already unmodifiable it returns itself rather than taking another snapshot. The receiver is left unchanged (and still modifiable unless it was already unmodifiable).

      Specified by:
      unmodifiable in class BasicHttpResponse<EarlyHints>
      Returns:
      An unmodifiable snapshot of this bean, or this bean if it is already unmodifiable.