Interface MediaTypeCodecRegistry

    • Method Detail

      • findCodec

        java.util.Optional<MediaTypeCodec> findCodec​(@Nullable
                                                     MediaType mediaType)
        Find a codec for the given media type.
        Parameters:
        mediaType - The MediaType
        Returns:
        The codec
      • findCodec

        java.util.Optional<MediaTypeCodec> findCodec​(@Nullable
                                                     MediaType mediaType,
                                                     java.lang.Class<?> type)
        Find a codec for the given media type and target type.
        Parameters:
        mediaType - The MediaType
        type - The type
        Returns:
        The codec
      • getCodecs

        java.util.Collection<MediaTypeCodec> getCodecs()
        Returns:
        The available codecs
      • of

        static MediaTypeCodecRegistry of​(java.util.Collection<MediaTypeCodec> codecs)
        Create a new registry from the given codecs.
        Parameters:
        codecs - The decoders
        Returns:
        The registry