public abstract class AbstractDataSerializableSessionSerializer<T> extends org.apache.geode.DataSerializer implements SessionSerializer<T,java.io.DataInput,java.io.DataOutput>
AbstractDataSerializableSessionSerializer class is an abstract base class encapsulating and implementing
operations common to all Apache Geode/Pivotal GemFire DataSerializer and Spring Session
SessionSerializer implementations.
This class is also an implementation of the Template Software Design Pattern, providing a default
implementations of the DataSerializer.toData(Object, DataOutput) and DataSerializer.fromData(DataInput)
methods.DataInput,
DataOutput,
DataSerializer,
SessionSerializer| Modifier and Type | Class and Description |
|---|---|
protected static interface |
AbstractDataSerializableSessionSerializer.DataInputReader<T> |
protected static interface |
AbstractDataSerializableSessionSerializer.DataOutputWriter |
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
DEFAULT_ALLOW_JAVA_SERIALIZATION |
| Constructor and Description |
|---|
AbstractDataSerializableSessionSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowJavaSerialization()
Determines whether Java Serialization is allowed during de/serialization when using this
DataSerializer. |
boolean |
canSerialize(java.lang.Class<?> type)
Determines whether the given
type can be de/serialized by this SessionSerializer. |
<T> T |
deserializeObject(java.io.DataInput in) |
java.lang.Object |
fromData(java.io.DataInput in) |
int |
getId()
Returns the identifier for this
DataSerializer. |
java.lang.Class<?>[] |
getSupportedClasses()
Returns the
types supported and handled by this DataSerializer during de/serialization. |
protected <T> T |
safeRead(java.io.DataInput in,
AbstractDataSerializableSessionSerializer.DataInputReader<T> reader) |
protected void |
safeWrite(java.io.DataOutput out,
AbstractDataSerializableSessionSerializer.DataOutputWriter writer) |
void |
serializeObject(java.lang.Object obj,
java.io.DataOutput out) |
void |
serializeObject(java.lang.Object obj,
java.io.DataOutput out,
boolean allowJavaSerialization) |
boolean |
toData(java.lang.Object session,
java.io.DataOutput out) |
equals, getContext, getEventId, hashCode, readArrayList, readArrayOfByteArrays, readBoolean, readBooleanArray, readByte, readByteArray, readCharacter, readCharArray, readClass, readConcurrentHashMap, readDate, readDouble, readDoubleArray, readEnum, readFile, readFloat, readFloatArray, readHashMap, readHashSet, readHashtable, readIdentityHashMap, readInetAddress, readIntArray, readInteger, readLinkedHashMap, readLinkedHashSet, readLinkedList, readLong, readLongArray, readNonPrimitiveClassName, readObject, readObjectArray, readPrimitiveBoolean, readPrimitiveByte, readPrimitiveChar, readPrimitiveDouble, readPrimitiveFloat, readPrimitiveInt, readPrimitiveLong, readPrimitiveShort, readProperties, readRegion, readShort, readShortArray, readStack, readString, readStringArray, readTreeMap, readTreeSet, readUnsignedByte, readUnsignedShort, readVector, register, setContext, setEventId, writeArrayList, writeArrayOfByteArrays, writeBoolean, writeBooleanArray, writeByte, writeByteArray, writeByteArray, writeCharacter, writeCharArray, writeClass, writeConcurrentHashMap, writeDate, writeDouble, writeDoubleArray, writeEnum, writeFile, writeFloat, writeFloatArray, writeHashMap, writeHashSet, writeHashtable, writeIdentityHashMap, writeInetAddress, writeIntArray, writeInteger, writeLinkedHashMap, writeLinkedHashSet, writeLinkedList, writeLong, writeLongArray, writeNonPrimitiveClassName, writeObject, writeObject, writeObjectArray, writeObjectAsByteArray, writePrimitiveBoolean, writePrimitiveByte, writePrimitiveChar, writePrimitiveDouble, writePrimitiveFloat, writePrimitiveInt, writePrimitiveLong, writePrimitiveShort, writeProperties, writeRegion, writeShort, writeShortArray, writeStack, writeString, writeStringArray, writeTreeMap, writeTreeSet, writeUnsignedByte, writeUnsignedShort, writeVectorclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcanSerialize, deserialize, serializeprotected static final boolean DEFAULT_ALLOW_JAVA_SERIALIZATION
public AbstractDataSerializableSessionSerializer()
public int getId()
DataSerializer.getId in class org.apache.geode.DataSerializerDataSerializer.public java.lang.Class<?>[] getSupportedClasses()
types supported and handled by this DataSerializer during de/serialization.getSupportedClasses in class org.apache.geode.DataSerializertypes supported and handled by this DataSerializer during de/serialization.Classprotected boolean allowJavaSerialization()
DataSerializer.DataSerializer.public boolean toData(java.lang.Object session,
java.io.DataOutput out)
throws java.io.IOException
toData in class org.apache.geode.DataSerializerjava.io.IOExceptionpublic void serializeObject(java.lang.Object obj,
java.io.DataOutput out)
throws java.io.IOException
java.io.IOExceptionpublic void serializeObject(java.lang.Object obj,
java.io.DataOutput out,
boolean allowJavaSerialization)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object fromData(java.io.DataInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
fromData in class org.apache.geode.DataSerializerjava.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic <T> T deserializeObject(java.io.DataInput in)
throws java.lang.ClassNotFoundException,
java.io.IOException
java.lang.ClassNotFoundExceptionjava.io.IOExceptionpublic boolean canSerialize(java.lang.Class<?> type)
SessionSerializertype can be de/serialized by this SessionSerializer.canSerialize in interface SessionSerializer<T,java.io.DataInput,java.io.DataOutput>type - Class to evaluate for whether de/serialization is supported.type can be de/serialized
by this SessionSerializer.SessionSerializer.canSerialize(Object)protected <T> T safeRead(java.io.DataInput in,
AbstractDataSerializableSessionSerializer.DataInputReader<T> reader)
protected void safeWrite(java.io.DataOutput out,
AbstractDataSerializableSessionSerializer.DataOutputWriter writer)