Interface Transcoder
-
- All Known Implementing Classes:
DefaultTranscoder,JavaSerializationTranscoder,JBossMarshallingTranscoder,JsonTranscoder,OneToManyTranscoder,TranscoderMarshallerAdapter,XMLTranscoder
public interface TranscoderConverts content between two or moreMediaTypes.Note: A transcoder must be symmetric: if it can convert from media type X to media type Y, it must also be able to convert from Y to X.
- Since:
- 9.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Set<MediaType>getSupportedMediaTypes()default booleansupports(MediaType mediaType)default booleansupportsConversion(MediaType mediaType, MediaType other)Objecttranscode(Object content, MediaType contentType, MediaType destinationType)Transcodes content between two differentMediaType.
-
-
-
Method Detail
-
transcode
Object transcode(Object content, MediaType contentType, MediaType destinationType)
Transcodes content between two differentMediaType.
-
getSupportedMediaTypes
Set<MediaType> getSupportedMediaTypes()
- Returns:
- all the
MediaTypehandled by this Transcoder.
-
supportsConversion
default boolean supportsConversion(MediaType mediaType, MediaType other)
- Returns:
trueif the transcoder supports the conversion between the suppliedMediaTypes.
-
-