public interface SessionSerializer<T,IN,OUT>
SessionSerializer interface is a Service Provider Interface (SPI) for providers
needing to provide a custom implementation of their serialization strategy.| Modifier and Type | Method and Description |
|---|---|
boolean |
canSerialize(java.lang.Class<?> type)
Determines whether the given
type can be de/serialized by this SessionSerializer. |
default boolean |
canSerialize(java.lang.Object obj)
Determines whether the given
Object can be de/serialized by this SessionSerializer. |
T |
deserialize(IN in)
Deserializes an
Object from bytes contained in the provided in stream. |
void |
serialize(T session,
OUT out)
Serializes the given
Object to the provided out stream. |
void serialize(T session, OUT out)
Object to the provided out stream.session - Object to serialize.out - stream in which to write the bytes of the Object.T deserialize(IN in)
Object from bytes contained in the provided in stream.in - stream from which to read the bytes of the Object.Object.boolean canSerialize(java.lang.Class<?> type)
type can be de/serialized by this SessionSerializer.type - Class to evaluate for whether de/serialization is supported.type can be de/serialized
by this SessionSerializer.canSerialize(Object)default boolean canSerialize(java.lang.Object obj)
Object can be de/serialized by this SessionSerializer.obj - Object to evaluate for whether de/serialization is supported.Object can be de/serialized
by this SessionSerializer.canSerialize(Class)