Class NotAcceptable

All Implemented Interfaces:
Serializable, HttpResponseMessage
Direct Known Subclasses:
NotAcceptable.Unmodifiable

public class NotAcceptable extends BasicHttpException
Represents an HTTP 406 Not Acceptable error response.

The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.

See Also:
Since:
9.2.1
See Also:
  • Field Details

  • Constructor Details

    • NotAcceptable

      public NotAcceptable()
      Constructor with no message.
    • NotAcceptable

      public NotAcceptable(String msg, Object... args)
      Constructor with a String.format-style message.
      Parameters:
      msg - The detail message. May be null. Treated as a String.format-style format string (%s placeholders) when args is non-empty.
      args - Optional message arguments.
    • NotAcceptable

      public NotAcceptable(Throwable cause)
      Constructor with a cause.
      Parameters:
      cause - The cause. May be null.
    • NotAcceptable

      public NotAcceptable(Throwable cause, String msg, Object... args)
      Constructor with a cause and a String.format-style message.
      Parameters:
      cause - The cause. May be null.
      msg - The detail message. May be null. Treated as a String.format-style format string (%s placeholders) when args is non-empty.
      args - Optional message arguments.
    • NotAcceptable

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

    • unmodifiable

      Description copied from class: BasicHttpException
      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).

      Overrides:
      unmodifiable in class BasicHttpException
      Returns:
      An unmodifiable snapshot of this bean, or this bean if it is already unmodifiable.