Package org.infinispan.marshall.core
Class EncoderRegistryImpl
java.lang.Object
org.infinispan.marshall.core.EncoderRegistryImpl
- All Implemented Interfaces:
EncoderRegistry
- Since:
- 9.1
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPerforms a data conversion.getEncoder
(Class<? extends Encoder> clazz, short encoderId) <T extends Transcoder>
TgetTranscoder
(Class<T> clazz) getTranscoder
(MediaType mediaType, MediaType another) Obtain an instance ofTranscoder
from the registry.getWrapper
(Class<? extends Wrapper> clazz, byte wrapperId) boolean
isConversionSupported
(MediaType from, MediaType to) boolean
isRegistered
(Class<? extends Encoder> encoderClass) void
registerEncoder
(Encoder encoder) void
registerTranscoder
(Transcoder transcoder) void
registerWrapper
(Wrapper wrapper)
-
Constructor Details
-
EncoderRegistryImpl
public EncoderRegistryImpl()
-
-
Method Details
-
registerEncoder
- Specified by:
registerEncoder
in interfaceEncoderRegistry
- Parameters:
encoder
-to be registered
.
-
registerWrapper
- Specified by:
registerWrapper
in interfaceEncoderRegistry
-
registerTranscoder
- Specified by:
registerTranscoder
in interfaceEncoderRegistry
-
getTranscoder
Description copied from interface:EncoderRegistry
Obtain an instance ofTranscoder
from the registry.- Specified by:
getTranscoder
in interfaceEncoderRegistry
- Parameters:
mediaType
-MediaType
supported by the transcoder.another
-MediaType
supported by the transcoder.- Returns:
- An instance of
Transcoder
capable of doing conversions between the supplied MediaTypes.
-
getTranscoder
- Specified by:
getTranscoder
in interfaceEncoderRegistry
-
isConversionSupported
- Specified by:
isConversionSupported
in interfaceEncoderRegistry
-
getEncoder
- Specified by:
getEncoder
in interfaceEncoderRegistry
-
isRegistered
- Specified by:
isRegistered
in interfaceEncoderRegistry
-
getWrapper
- Specified by:
getWrapper
in interfaceEncoderRegistry
-
convert
Description copied from interface:EncoderRegistry
Performs a data conversion.- Specified by:
convert
in interfaceEncoderRegistry
- Parameters:
o
- object to convertfrom
- the object MediaTypeto
- the format to convert to- Returns:
- the object converted.
-