T
- The type of objects to serialize.public interface HttpSerializer<T>
Modifier and Type | Method and Description |
---|---|
BlockingIterable<Buffer> |
serialize(HttpHeaders headers,
BlockingIterable<T> value,
BufferAllocator allocator)
|
HttpPayloadWriter<T> |
serialize(HttpHeaders headers,
HttpPayloadWriter<Buffer> payloadWriter,
BufferAllocator allocator)
|
Publisher<Buffer> |
serialize(HttpHeaders headers,
Publisher<T> value,
BufferAllocator allocator)
|
Buffer |
serialize(HttpHeaders headers,
T value,
BufferAllocator allocator)
Serialize an object of type
T into a Buffer . |
Buffer serialize(HttpHeaders headers, T value, BufferAllocator allocator)
T
into a Buffer
. If necessary the HttpHeaders
should be
updated to indicate the content-type.headers
- The HttpHeaders
associated with the serialization operation.value
- The object to serialize.allocator
- The BufferAllocator
used to create the returned Buffer
.BlockingIterable<Buffer> serialize(HttpHeaders headers, BlockingIterable<T> value, BufferAllocator allocator)
BlockingIterable
of type T
into an BlockingIterable
of type
Buffer
. If necessary the HttpHeaders
should be updated to indicate the
content-type.headers
- The HttpHeaders
associated with the serialization operation.value
- The objects to serialize.allocator
- The BufferAllocator
used to create the resulting Buffer
s.Publisher<Buffer> serialize(HttpHeaders headers, Publisher<T> value, BufferAllocator allocator)
Publisher
of type T
into a Publisher
of type Buffer
. If necessary the
HttpHeaders
should be updated to indicate the
content-type.headers
- The HttpHeaders
associated with the serialization operation.value
- The objects to serialize.allocator
- The BufferAllocator
used to create the resulting Buffer
s.HttpPayloadWriter<T> serialize(HttpHeaders headers, HttpPayloadWriter<Buffer> payloadWriter, BufferAllocator allocator)
HttpPayloadWriter
of type T
which serializes each
written object
into a Buffer
. If necessary the
HttpHeaders
should be updated to indicate the
content-type.headers
- The HttpHeaders
associated with the serialization operation.payloadWriter
- The HttpPayloadWriter
which writes serialized Buffer
s.allocator
- The BufferAllocator
used to create the resulting Buffer
s.HttpPayloadWriter
of type T
with embedded serialization into a Buffer
.