org.springframework.web
Class HttpMediaTypeException
java.lang.Object
ServletException
org.springframework.web.HttpMediaTypeException
- 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
Constructor Summary |
protected |
HttpMediaTypeException(java.lang.String message)
Create a new MediaTypeException. |
protected |
HttpMediaTypeException(java.lang.String message,
java.util.List<MediaType> supportedMediaTypes)
Create a new HttpMediaTypeNotSupportedException. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
supportedMediaTypes
private final java.util.List<MediaType> supportedMediaTypes
HttpMediaTypeException
protected HttpMediaTypeException(java.lang.String message)
- Create a new MediaTypeException.
- Parameters:
message
- the exception message
HttpMediaTypeException
protected HttpMediaTypeException(java.lang.String message,
java.util.List<MediaType> supportedMediaTypes)
- Create a new HttpMediaTypeNotSupportedException.
- Parameters:
supportedMediaTypes
- the list of supported media types
getSupportedMediaTypes
public java.util.List<MediaType> getSupportedMediaTypes()
- Return the list of supported media types.