Interface ContentTypeResolver
- All Known Implementing Classes:
DefaultContentTypeResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ContentTypeResolver
Resolve the content type for a message.- Since:
- 4.0
- Author:
- Rossen Stoyanchev
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MimeType
resolve(MessageHeaders headers)
Determine theMimeType
of a message from the given MessageHeaders.
Method Detail
resolve
@Nullable MimeType resolve(@Nullable MessageHeaders headers) throws InvalidMimeTypeException
Determine theMimeType
of a message from the given MessageHeaders.- Parameters:
headers
- the headers to use for the resolution- Returns:
- the resolved
MimeType
, ornull
if none found - Throws:
InvalidMimeTypeException
- if the content type is a String that cannot be parsedIllegalArgumentException
- if there is a content type but its type is unknown