Package org.infinispan.encoding
Class ProtostreamTranscoder
- java.lang.Object
-
- org.infinispan.commons.dataconversion.AbstractTranscoder
-
- org.infinispan.commons.dataconversion.OneToManyTranscoder
-
- org.infinispan.encoding.ProtostreamTranscoder
-
- All Implemented Interfaces:
Transcoder
public class ProtostreamTranscoder extends OneToManyTranscoder
Performs conversions between application/x-protostream and commons formats.
When converting to application/x-protostream, it will produce payloads with
WrappedMessage
by default, unless the param wrapped is supplied in the destinationMediaType
with value falseConverting back to application/x-java-object requires either a payload that is a
WrappedMessage
or an unwrapped payload plus the type of the java object to convert to, specified using the type parameter in the application/x-java-objectMediaType
.- Since:
- 10.0
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.infinispan.util.logging.Log
logger
static String
WRAPPED_PARAM
-
Fields inherited from class org.infinispan.commons.dataconversion.OneToManyTranscoder
mainType, supportedTypes
-
-
Constructor Summary
Constructors Constructor Description ProtostreamTranscoder(org.infinispan.marshall.protostream.impl.SerializationContextRegistry ctxRegistry, ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
doTranscode(Object content, MediaType contentType, MediaType destinationType)
-
Methods inherited from class org.infinispan.commons.dataconversion.OneToManyTranscoder
getSupportedMediaTypes, supportsConversion
-
Methods inherited from class org.infinispan.commons.dataconversion.AbstractTranscoder
decodeContent, encodeContent, transcode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.commons.dataconversion.Transcoder
supports
-
-
-
-
Field Detail
-
WRAPPED_PARAM
public static final String WRAPPED_PARAM
- See Also:
- Constant Field Values
-
logger
protected static final org.infinispan.util.logging.Log logger
-
-
Constructor Detail
-
ProtostreamTranscoder
public ProtostreamTranscoder(org.infinispan.marshall.protostream.impl.SerializationContextRegistry ctxRegistry, ClassLoader classLoader)
-
-
Method Detail
-
doTranscode
public Object doTranscode(Object content, MediaType contentType, MediaType destinationType)
- Specified by:
doTranscode
in classAbstractTranscoder
-
-