Class NotAcceptableException

All Implemented Interfaces:
Serializable

public class NotAcceptableException extends HttpException

A HTTP exception that indicates a Not Acceptable (406) client requested.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Constructor Details

    • NotAcceptableException

      public NotAcceptableException()

      Creates a not acceptable exception.

    • NotAcceptableException

      public NotAcceptableException(String message)

      Creates a not acceptable exception with the specified message.

      Parameters:
      message - a message
    • NotAcceptableException

      public NotAcceptableException(Throwable cause)

      Creates a not acceptable exception with the specified cause.

      Parameters:
      cause - a cause
    • NotAcceptableException

      public NotAcceptableException(String message, Throwable cause)

      Creates a not acceptable exception with the specified message and cause.

      Parameters:
      message - a message
      cause - a cause
    • NotAcceptableException

      public NotAcceptableException(Set<String> acceptableMediaTypes)

      Creates a not acceptable exception with the specified list of media types accepted by the requested resource.

      Parameters:
      acceptableMediaTypes - a list of acceptable media types
    • NotAcceptableException

      public NotAcceptableException(Set<String> acceptableMediaTypes, String message)

      Creates a not acceptable exception with the specified list of media types accepted by the requested resource and message.

      Parameters:
      acceptableMediaTypes - a list of acceptable media types
      message - a message
    • NotAcceptableException

      public NotAcceptableException(Set<String> acceptableMediaTypes, Throwable cause)

      Creates a not acceptable exception with the specified list of media types accepted by the requested resource and cause.

      Parameters:
      acceptableMediaTypes - a list of acceptable media types
      cause - a cause
    • NotAcceptableException

      public NotAcceptableException(Set<String> acceptableMediaTypes, String message, Throwable cause)

      Creates a not acceptable exception with the specified list of media types accepted by the requested resource, message and cause.

      Parameters:
      acceptableMediaTypes - a list of acceptable media types
      message - a message
      cause - a cause
  • Method Details

    • getAcceptableMediaTypes

      public Optional<Set<String>> getAcceptableMediaTypes()

      Returns the list of media types accepted by the requested resource.

      Returns:
      the list of acceptable media types