public interface HttpSerializationProvider
HttpSerializer
s and HttpDeserializer
s.Modifier and Type | Method and Description |
---|---|
<T> HttpDeserializer<T> |
deserializerFor(java.lang.Class<T> type)
|
<T> HttpDeserializer<T> |
deserializerFor(TypeHolder<T> type)
|
<T> HttpSerializer<T> |
serializerFor(java.lang.Class<T> type)
|
<T> HttpSerializer<T> |
serializerFor(java.lang.Class<T> type,
java.util.function.IntUnaryOperator bytesEstimator)
|
<T> HttpSerializer<T> |
serializerFor(TypeHolder<T> type)
|
<T> HttpSerializer<T> |
serializerFor(TypeHolder<T> type,
java.util.function.IntUnaryOperator bytesEstimator)
|
<T> HttpSerializer<T> serializerFor(java.lang.Class<T> type)
T
- The type of object to serialize.type
- The Class
type that the returned HttpSerializer
can serialize.HttpSerializer
for a Class
of type T
.<T> HttpSerializer<T> serializerFor(java.lang.Class<T> type, java.util.function.IntUnaryOperator bytesEstimator)
T
- The type of object to serialize.type
- The Class
type that the returned HttpSerializer
can serialize.bytesEstimator
- An IntUnaryOperator
that given the last serialized size in bytes, estimates the
size of the next object to be serialized in bytes.HttpSerializer
for a Class
of type T
.<T> HttpSerializer<T> serializerFor(TypeHolder<T> type)
T
- The type of object to serialize.type
- The TypeHolder
type that the returned HttpSerializer
can serialize.HttpSerializer
for a TypeHolder
of type T
.<T> HttpSerializer<T> serializerFor(TypeHolder<T> type, java.util.function.IntUnaryOperator bytesEstimator)
T
- The type of object to serialize.type
- The TypeHolder
type that the returned HttpSerializer
can serialize.bytesEstimator
- An IntUnaryOperator
that given the last serialized size in bytes, estimates the
size of the next object to be serialized in bytes.HttpSerializer
for a TypeHolder
of type T
.<T> HttpDeserializer<T> deserializerFor(java.lang.Class<T> type)
T
- The type of object to serialize.type
- The Class
type that the return value will serialize.HttpDeserializer
for a Class
of type T
.<T> HttpDeserializer<T> deserializerFor(TypeHolder<T> type)
T
- The type of object to serialize.type
- The TypeHolder
type that the return value will serialize.HttpDeserializer
for a TypeHolder
of type T
.