public final class StandardSerializerProvider extends Object implements SerializerProvider
SerializerProvider
that provides Java Standard Serialization.Modifier and Type | Method and Description |
---|---|
static SerializerProvider |
getInstance()
Gets the only instance of
StandardSerializerProvider . |
<T> Serializer<T> |
getSerializer(Class<T> subject)
Gets a
serializer for the given subject . |
<T> Serializer<T> |
getSerializer(String subjectClassName)
Gets a
serializer for the given subject . |
public static SerializerProvider getInstance()
StandardSerializerProvider
.StandardSerializerProvider
public <T> Serializer<T> getSerializer(Class<T> subject) throws IllegalArgumentException
SerializerProvider
serializer
for the given subject
.getSerializer
in interface SerializerProvider
subject
- subject to get a serializer
forserializer
suitable to
serialize/deserialize the given subject
IllegalArgumentException
- if a serializer
is
not possible fot the given subject
public <T> Serializer<T> getSerializer(String subjectClassName) throws IllegalArgumentException, ClassNotFoundException
SerializerProvider
serializer
for the given subject
.getSerializer
in interface SerializerProvider
subjectClassName
- class name of the subject to get a
serializer
forserializer
suitable to
serialize/deserialize the given subjectIllegalArgumentException
- if a serializer
is
not possible fot the given subject
ClassNotFoundException
- if the class given by
subjectClassName
is not foundCopyright © 2015. All Rights Reserved.