public class SerializedObjectHolder extends Object implements SerializationAware
Constructor and Description |
---|
SerializedObjectHolder(Message message)
Initialize the holder for the serialized representations of the payload and meta data of given
message |
Modifier and Type | Method and Description |
---|---|
<T> SerializedObject<T> |
serializeMetaData(Serializer serializer,
Class<T> expectedRepresentation)
Serialize the meta data of this message using given
serializer , using given
expectedRepresentation . |
<T> SerializedObject<T> |
serializePayload(Serializer serializer,
Class<T> expectedRepresentation)
Serialize the payload of this message using given
serializer , using given
expectedRepresentation . |
public SerializedObjectHolder(Message message)
message
message
- The message to initialize the holder forpublic <T> SerializedObject<T> serializePayload(Serializer serializer, Class<T> expectedRepresentation)
SerializationAware
serializer
, using given
expectedRepresentation
. This method should return the same SerializedObject instance when
invoked multiple times using the same serializer.serializePayload
in interface SerializationAware
T
- The type of data to serialize toserializer
- The serializer to serialize payload withexpectedRepresentation
- The type of data to serialize topublic <T> SerializedObject<T> serializeMetaData(Serializer serializer, Class<T> expectedRepresentation)
SerializationAware
serializer
, using given
expectedRepresentation
. This method should return the same SerializedObject instance when
invoked multiple times using the same serializer.serializeMetaData
in interface SerializationAware
T
- The type of data to serialize toserializer
- The serializer to serialize meta data withexpectedRepresentation
- The type of data to serialize toCopyright © 2010–2018. All rights reserved.