public abstract class

HttpMediaTypeException

extends ServletException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ javax.servlet.ServletException
         ↳ org.springframework.web.HttpMediaTypeException
Known Direct Subclasses

Class Overview

Abstract base for exceptions related to media types. Adds a list of supported MediaTypes.

Summary

Protected Constructors
HttpMediaTypeException(String message)
Create a new MediaTypeException.
HttpMediaTypeException(String message, List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeNotSupportedException.
Public Methods
List<MediaType> getSupportedMediaTypes()
Return the list of supported media types.
[Expand]
Inherited Methods
From class javax.servlet.ServletException
From class java.lang.Throwable
From class java.lang.Object

Protected Constructors

protected HttpMediaTypeException (String message)

Create a new MediaTypeException.

Parameters
message the exception message

protected HttpMediaTypeException (String message, List<MediaType> supportedMediaTypes)

Create a new HttpMediaTypeNotSupportedException.

Parameters
supportedMediaTypes the list of supported media types

Public Methods

public List<MediaType> getSupportedMediaTypes ()

Return the list of supported media types.