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 Tdeserialize(HttpHeaders headers, Buffer payload)Deserialize a singleObjectinto 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 singleObjectinto aHttpDeserializer.- Parameters:
headers- TheHttpHeadersassociated with thepayload.payload- TheObjectto 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- TheHttpHeadersassociated with thepayload.payload- Provides theObjects to deserialize. The contents are assumed to be in memory, otherwise this method may block.- Returns:
- a
BlockingIterableof typeHttpDeserializerwhich is the result of the deserialization.
-
deserialize
Publisher<T> deserialize(HttpHeaders headers, Publisher<Buffer> payload)
- Parameters:
headers- TheHttpHeadersassociated with thepayload.payload- Provides theObjects to deserialize.- Returns:
- a
Publisherof typeHttpDeserializerwhich is the result of the deserialization.
-
-