Class HttpMediaTypeException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HttpMediaTypeNotAcceptableException, HttpMediaTypeNotSupportedException

public abstract class HttpMediaTypeException extends ServletException
Abstract base for exceptions related to media types. Adds a list of supported MediaTypes.
Since:
3.0
Author:
Arjen Poutsma
See Also:
  • Constructor Details

    • HttpMediaTypeException

      protected HttpMediaTypeException(String message)
      Create a new HttpMediaTypeException.
      Parameters:
      message - the exception message
    • HttpMediaTypeException

      protected HttpMediaTypeException(String message, List<MediaType> supportedMediaTypes)
      Create a new HttpMediaTypeException with a list of supported media types.
      Parameters:
      supportedMediaTypes - the list of supported media types
  • Method Details

    • getSupportedMediaTypes

      public List<MediaType> getSupportedMediaTypes()
      Return the list of supported media types.