Package io.servicetalk.http.api
Interface HttpStreamingDeserializer<T>
- Type Parameters:
T
- The type of objects to serialize.
- All Known Subinterfaces:
HttpStreamingSerializerDeserializer<T>
public interface HttpStreamingDeserializer<T>
HTTP request/response deserialization for streaming payload bodies.
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(HttpHeaders headers, Publisher<Buffer> payload, BufferAllocator allocator) default BlockingIterable<T>
deserialize
(HttpHeaders headers, BlockingIterable<Buffer> payload, BufferAllocator allocator) Deserialize aBlockingIterable
ofObject
s into aBlockingIterable
of typeHttpStreamingDeserializer
.
-
Method Details
-
deserialize
- Parameters:
headers
- TheHttpHeaders
associated with thepayload
.payload
- Provides theObject
s to deserialize.allocator
- Used to allocateBuffer
s if necessary during deserialization.- Returns:
- a
Publisher
of typeHttpStreamingDeserializer
which is the result of the deserialization.
-
deserialize
default BlockingIterable<T> deserialize(HttpHeaders headers, BlockingIterable<Buffer> payload, BufferAllocator allocator) Deserialize aBlockingIterable
ofObject
s into aBlockingIterable
of typeHttpStreamingDeserializer
.- 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.allocator
- Used to allocateBuffer
s if necessary during deserialization.- Returns:
- a
BlockingIterable
of typeHttpStreamingDeserializer
which is the result of the deserialization.
-