Package io.servicetalk.http.api
Interface HttpDeserializer<T>
-
- Type Parameters:
T
- The type of objects to deserialize.
public interface HttpDeserializer<T>
A factory to address deserialization concerns for HTTP request/response payload bodies.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
deserialize(HttpHeaders headers, Buffer payload)
Deserialize a singleObject
into aHttpDeserializer
.Publisher<T>
deserialize(HttpHeaders headers, Publisher<Buffer> payload)
BlockingIterable<T>
deserialize(HttpHeaders headers, BlockingIterable<Buffer> payload)
-
-
-
Method Detail
-
deserialize
T deserialize(HttpHeaders headers, Buffer payload)
Deserialize a singleObject
into aHttpDeserializer
.- Parameters:
headers
- TheHttpHeaders
associated with thepayload
.payload
- TheObject
to deserialize. The contents are assumed to be in memory, otherwise this method may block.- Returns:
- The result of the deserialization.
-
deserialize
BlockingIterable<T> deserialize(HttpHeaders headers, BlockingIterable<Buffer> payload)
- Parameters:
headers
- TheHttpHeaders
associated with thepayload
.payload
- Provides theObject
s to deserialize. The contents are assumed to be in memory, otherwise this method may block.- Returns:
- a
BlockingIterable
of typeHttpDeserializer
which is the result of the deserialization.
-
deserialize
Publisher<T> deserialize(HttpHeaders headers, Publisher<Buffer> payload)
- Parameters:
headers
- TheHttpHeaders
associated with thepayload
.payload
- Provides theObject
s to deserialize.- Returns:
- a
Publisher
of typeHttpDeserializer
which is the result of the deserialization.
-
-