public interface SessionSerializer
The SessionModule provides a default implementation that uses Java's in built serialization.
JavaSessionSerializer| Modifier and Type | Method and Description |
|---|---|
<T> T |
deserialize(java.lang.Class<T> type,
java.io.InputStream in)
Reads the bytes of the given input stream, creating a new object.
|
<T> void |
serialize(java.lang.Class<T> type,
T value,
java.io.OutputStream out)
Writes the given value to the output stream as bytes.
|
<T> void serialize(java.lang.Class<T> type,
T value,
java.io.OutputStream out)
throws java.lang.Exception
T - the type of the objecttype - the declared type of the objectvalue - the value to serializeout - the destination for the bytesjava.lang.Exception - if the value could not be serialized<T> T deserialize(java.lang.Class<T> type,
java.io.InputStream in)
throws java.lang.Exception
T - the type of the objecttype - the expected type of the objectin - the source of the bytesjava.io.IOException - any thrown by injava.lang.Exception - the the value could not be deserialized