Package io.micronaut.http.codec
Interface MediaTypeCodecRegistry
- All Known Implementing Classes:
AnnotatedFunctionRouteBuilder
,DefaultLocalFunctionRegistry
,DefaultMediaTypeCodecRegistry
public interface MediaTypeCodecRegistry
A registry of decoders.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptionFind a codec for the given media type.Find a codec for the given media type and target type.static MediaTypeCodecRegistry
of
(MediaTypeCodec... codecs) Create a new registry from the given codecs.static MediaTypeCodecRegistry
of
(Collection<MediaTypeCodec> codecs) Create a new registry from the given codecs.
-
Method Details
-
findCodec
Find a codec for the given media type.- Parameters:
mediaType
- TheMediaType
- Returns:
- The codec
-
findCodec
Find a codec for the given media type and target type.- Parameters:
mediaType
- TheMediaType
type
- The type- Returns:
- The codec
-
getCodecs
Collection<MediaTypeCodec> getCodecs()- Returns:
- The available codecs
-
of
Create a new registry from the given codecs.- Parameters:
codecs
- The decoders- Returns:
- The registry
-
of
Create a new registry from the given codecs.- Parameters:
codecs
- The decoders- Returns:
- The registry
-