T - The type of objects to serialize.@FunctionalInterface
public interface HttpSerializer2<T>
| Modifier and Type | Method and Description |
|---|---|
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.