Interface Transcoder
-
- All Known Implementing Classes:
DefaultTranscoder
,JavaSerializationTranscoder
,JBossMarshallingTranscoder
,JsonTranscoder
,OneToManyTranscoder
,TranscoderMarshallerAdapter
,XMLTranscoder
public interface Transcoder
Converts content between two or moreMediaType
s.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 boolean
supports(MediaType mediaType)
default boolean
supportsConversion(MediaType mediaType, MediaType other)
Object
transcode(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
MediaType
handled by this Transcoder.
-
supportsConversion
default boolean supportsConversion(MediaType mediaType, MediaType other)
- Returns:
true
if the transcoder supports the conversion between the suppliedMediaType
s.
-
-