Package io.servicetalk.http.api
Interface HttpSerializer<T>
- Type Parameters:
T
- The type of objects to serialize.
- All Superinterfaces:
HttpSerializer2<T>
Deprecated.
A factory to address serialization concerns for HTTP request/response payload bodies.
-
Method Summary
Modifier and TypeMethodDescriptionserialize
(HttpHeaders headers, Publisher<T> value, BufferAllocator allocator) Deprecated.serialize
(HttpHeaders headers, BlockingIterable<T> value, BufferAllocator allocator) Deprecated.serialize
(HttpHeaders headers, HttpPayloadWriter<Buffer> payloadWriter, BufferAllocator allocator) Deprecated.Returns anHttpPayloadWriter
of typeHttpSerializer
which serializes eachwritten object
into aBuffer
.Methods inherited from interface io.servicetalk.http.api.HttpSerializer2
serialize
-
Method Details
-
serialize
BlockingIterable<Buffer> serialize(HttpHeaders headers, BlockingIterable<T> value, BufferAllocator allocator) Deprecated.Serialize anBlockingIterable
of typeHttpSerializer
into anBlockingIterable
of typeBuffer
. If necessary theHttpHeaders
should be updated to indicate the content-type.- Parameters:
headers
- TheHttpHeaders
associated with the serialization operation.value
- The objects to serialize.allocator
- TheBufferAllocator
used to create the resultingBuffer
s.- Returns:
- The result of the serialization operation.
-
serialize
Deprecated.Serialize aPublisher
of typeHttpSerializer
into aPublisher
of typeBuffer
. If necessary theHttpHeaders
should be updated to indicate the content-type.- Parameters:
headers
- TheHttpHeaders
associated with the serialization operation.value
- The objects to serialize.allocator
- TheBufferAllocator
used to create the resultingBuffer
s.- Returns:
- The result of the serialization operation.
-
serialize
HttpPayloadWriter<T> serialize(HttpHeaders headers, HttpPayloadWriter<Buffer> payloadWriter, BufferAllocator allocator) Deprecated.Returns anHttpPayloadWriter
of typeHttpSerializer
which serializes eachwritten object
into aBuffer
. If necessary theHttpHeaders
should be updated to indicate the content-type.- Parameters:
headers
- TheHttpHeaders
associated with the serialization operation.payloadWriter
- TheHttpPayloadWriter
which writes serializedBuffer
s.allocator
- TheBufferAllocator
used to create the resultingBuffer
s.- Returns:
- The
HttpPayloadWriter
of typeHttpSerializer
with embedded serialization into aBuffer
.
-
HttpSerializer2
orHttpStreamingSerializer
.