Class MultipleChoices

java.lang.Object
org.apache.juneau.http.classic.response.BasicHttpResponse<MultipleChoices>
org.apache.juneau.http.classic.response.MultipleChoices
All Implemented Interfaces:
HttpMessage, HttpResponse
Direct Known Subclasses:
MultipleChoices.Unmodifiable

Represents an HTTP 300 Multiple Choices response.

Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation). For example, this code could be used to present multiple video format options, to list files with different filename extensions, or to suggest word-sense disambiguation.

See Also:
  • Field Details

  • Constructor Details

    • MultipleChoices

      public MultipleChoices()
      Constructor.
    • MultipleChoices

      public MultipleChoices(HttpResponse response)
      Constructor.

      This is the constructor used when parsing an HTTP response.

      Parameters:
      response - The HTTP response to copy from. Must not be null.
      Throws:
      IllegalArgumentException - If HTTP response status code does not match what was expected.
    • MultipleChoices

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

    • copy

      Creates a builder for this class initialized with the contents of this bean.
      Returns:
      A new builder bean.
    • 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<MultipleChoices>
      Returns:
      An unmodifiable snapshot of this bean, or this bean if it is already unmodifiable.