-
- All Implemented Interfaces:
public final class MediaTypeEncodersContainer for MediaTypeEncoders that allows registering and locating encoders for specific media types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMediaTypeEncoders.BuilderBuilder for MediaTypeEncoders.
public classMediaTypeEncoders.Companion
-
Constructor Summary
Constructors Constructor Description MediaTypeEncoders(Map<MediaType, MediaTypeEncoder> registered)
-
Method Summary
Modifier and Type Method Description final Booleansupports(MediaType mediaType)Check if the given media type has an encoder registered. final MediaTypeEncoderfind(MediaType mediaType)Locates a compatible encoder for the given media type. -
-
Constructor Detail
-
MediaTypeEncoders
MediaTypeEncoders(Map<MediaType, MediaTypeEncoder> registered)
-
-
Method Detail
-
supports
final Boolean supports(MediaType mediaType)
Check if the given media type has an encoder registered.
-
find
final MediaTypeEncoder find(MediaType mediaType)
Locates a compatible encoder for the given media type.
- Parameters:
mediaType- Media type to locate encoder for.
-
-
-
-