T - The object type that the serializer can serialize/de-serializepublic interface ContextSerializer<T>
ContextsContainer.
This serializer will be used to serialize when the context objects are to be sent across the wire to another service
vai NIWS client.
This serializer will be used to de-serialize when the context objects are received on the wire from another service
as HTTP request headers.
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(java.lang.String serialized,
int version)
De-serializes the passed object
serialized. |
int |
getVersion()
Returns the version of this serializer.
|
java.lang.String |
serialize(T toSerialize)
Serializes the passed object
toSerialize |
int getVersion()
java.lang.String serialize(T toSerialize) throws ContextSerializationException
toSerializetoSerialize - The object to serialize. This object will never be nullnull
and hence the callee will throw a ContextSerializationException upon receiving a nullContextSerializationException - If the serialization failed.T deserialize(java.lang.String serialized, int version) throws ContextSerializationException
serialized.serialized - The serialized object to de-serialize. This string will never be nullversion - The version of the serializer as returned by getVersion() used to
serialize the passed string.null
and hence the callee will throw a ContextSerializationException upon receiving a nullContextSerializationException - If the de-serialization failed.