public class MediaTypeNotSupportedStatusException extends ResponseStatusException
Modifier and Type | Field and Description |
---|---|
private java.util.List<MediaType> |
supportedMediaTypes |
Constructor and Description |
---|
MediaTypeNotSupportedStatusException(java.util.List<MediaType> supportedMediaTypes)
Constructor for when the Content-Type is not supported.
|
MediaTypeNotSupportedStatusException(java.lang.String reason)
Constructor for when the Content-Type is invalid.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<MediaType> |
getSupportedMediaTypes()
Return the list of supported content types in cases when the Accept
header is parsed but not supported, or an empty list otherwise.
|
getReason, getStatus
contains, getMessage, getMostSpecificCause, getRootCause
private final java.util.List<MediaType> supportedMediaTypes
public MediaTypeNotSupportedStatusException(java.lang.String reason)
public MediaTypeNotSupportedStatusException(java.util.List<MediaType> supportedMediaTypes)
public java.util.List<MediaType> getSupportedMediaTypes()