Package io.servicetalk.http.api
Interface HttpDeserializer2<T>
- Type Parameters:
T
- The type of objects to deserialize.
- All Known Subinterfaces:
HttpSerializerDeserializer<T>
public interface HttpDeserializer2<T>
A factory to address deserialization concerns for HTTP request/response payload bodies.
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(HttpHeaders headers, BufferAllocator allocator, Buffer payload) Deserialize a singleObject
into aHttpDeserializer2
.
-
Method Details
-
deserialize
Deserialize a singleObject
into aHttpDeserializer2
.- Parameters:
headers
- TheHttpHeaders
associated with thepayload
.allocator
- Used to allocate intermediateBuffer
s if required.payload
- TheObject
to deserialize. The contents are assumed to be in memory, otherwise this method may block.- Returns:
- The result of the deserialization.
-