Interface SessionSerializer<T,IN,OUT>
- All Known Implementing Classes:
AbstractDataSerializableSessionSerializer
,AbstractPdxSerializableSessionSerializer
,DataSerializableSessionAttributesSerializer
,DataSerializableSessionSerializer
,DataSerializerSessionSerializerAdapter
,PdxSerializableSessionSerializer
,PdxSerializerSessionSerializerAdapter
public interface SessionSerializer<T,IN,OUT>
The
SessionSerializer
interface is a Service Provider Interface (SPI) for providers
needing to provide a custom implementation of their serialization strategy.- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canSerialize
(Class<?> type) Determines whether the giventype
can be de/serialized by thisSessionSerializer
.default boolean
canSerialize
(Object obj) Determines whether the givenObject
can be de/serialized by thisSessionSerializer
.deserialize
(IN in) Deserializes anObject
from bytes contained in the providedin
stream.void
Serializes the givenObject
to the providedout
stream.
-
Method Details
-
serialize
Serializes the givenObject
to the providedout
stream. -
deserialize
Deserializes anObject
from bytes contained in the providedin
stream. -
canSerialize
Determines whether the giventype
can be de/serialized by thisSessionSerializer
.- Parameters:
type
-Class
to evaluate for whether de/serialization is supported.- Returns:
- a boolean value indicating whether the specified
type
can be de/serialized by thisSessionSerializer
. - See Also:
-
canSerialize
Determines whether the givenObject
can be de/serialized by thisSessionSerializer
.- Parameters:
obj
-Object
to evaluate for whether de/serialization is supported.- Returns:
- a boolean value indicating whether the specified
Object
can be de/serialized by thisSessionSerializer
. - See Also:
-