Class EncoderRegistryImpl
java.lang.Object
org.infinispan.marshall.core.EncoderRegistryImpl
- All Implemented Interfaces:
EncoderRegistry
- Since:
- 9.1
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPerforms a data conversion.<T extends Transcoder>
TgetTranscoder(Class<T> clazz) Looks up aTranscoderin the registrygetTranscoder(MediaType mediaType, MediaType another) Retrieves an instance ofTranscoderfrom the registry.booleanisConversionSupported(MediaType from, MediaType to) Returns whether conversion between specificMediaTypes is supportedvoidregisterTranscoder(Transcoder transcoder) Registers a transcoder in the registryvoidregisterWrapper(Wrapper wrapper)
-
Constructor Details
-
EncoderRegistryImpl
public EncoderRegistryImpl()
-
-
Method Details
-
registerWrapper
-
registerTranscoder
Description copied from interface:EncoderRegistryRegisters a transcoder in the registry- Specified by:
registerTranscoderin interfaceEncoderRegistry- Parameters:
transcoder- the transcoder instance to register
-
getTranscoder
Description copied from interface:EncoderRegistryRetrieves an instance ofTranscoderfrom the registry.- Specified by:
getTranscoderin interfaceEncoderRegistry- Parameters:
mediaType-MediaTypesupported by the transcoder.another-MediaTypesupported by the transcoder.- Returns:
- An instance of
Transcodercapable of doing conversions between the supplied MediaTypes.
-
getTranscoder
Description copied from interface:EncoderRegistryLooks up aTranscoderin the registry- Specified by:
getTranscoderin interfaceEncoderRegistry- Type Parameters:
T- the specific transcoder implementation type- Parameters:
clazz- the class of the transcoder- Returns:
- the registered instance of the transcoder
-
isConversionSupported
Description copied from interface:EncoderRegistryReturns whether conversion between specificMediaTypes is supported- Specified by:
isConversionSupportedin interfaceEncoderRegistry- Parameters:
from- the sourceMediaTypeto- the destinationMediaType- Returns:
- true if conversion between the specified types is supported
-
convert
Description copied from interface:EncoderRegistryPerforms a data conversion.- Specified by:
convertin interfaceEncoderRegistry- Parameters:
o- object to convertfrom- the object MediaTypeto- the format to convert to- Returns:
- the object converted.
-