public interface DirectionAwareContextSerializer<T> extends ContextSerializer<T>
ContextSerializer for BiDirectional contexts that requires information about the
direction of flow (i.e. request or response). For legacy reasons, this class extends ContextSerializer, the
easier way to implement a direction aware serializer will be to extend DirectionAwareSerializerAdapter which
provides a default implementation of the methods in ContextSerializer DirectionAwareContextSerializer.Direction.InboundDirectionAwareContextSerializer.Direction.Outbound| Modifier and Type | Interface and Description |
|---|---|
static class |
DirectionAwareContextSerializer.Direction
Directions defined by this interface.
|
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(java.lang.String serialized,
DirectionAwareContextSerializer.Direction direction,
int version)
De-serializes the passed object
serialized. |
java.lang.String |
serialize(T toSerialize,
DirectionAwareContextSerializer.Direction direction)
Serializes the passed object
toSerialize |
deserialize, getVersion, serializejava.lang.String serialize(T toSerialize, DirectionAwareContextSerializer.Direction direction) throws ContextSerializationException
toSerializetoSerialize - The object to serialize. This object will never be nulldirection - Direction of message flow. See DirectionAwareContextSerializer for definitions.null
and hence the callee will throw a ContextSerializationException upon receiving a nullContextSerializationException - If the serialization failed.DirectionAwareContextSerializerT deserialize(java.lang.String serialized, DirectionAwareContextSerializer.Direction direction, int version) throws ContextSerializationException
serialized.serialized - The serialized object to de-serialize. This string will never be nullversion - The version of the serializer as returned by ContextSerializer.getVersion() used to
serialize the passed string.direction - Direction of message flow. See DirectionAwareContextSerializer for definitions.null
and hence the callee will throw a ContextSerializationException upon receiving a nullContextSerializationException - If the de-serialization failed.DirectionAwareContextSerializer