T - The type to serialize/deserialize.public final class FramedDeserializerOperator<T>
extends Object
implements PublisherOperator<Buffer,Iterable<T>>
StreamingDeserializer leverage a Deserializer and apply a
framing to define the boundaries of each object.| Constructor and Description |
|---|
FramedDeserializerOperator(Deserializer<T> deserializer,
Supplier<BiFunction<Buffer,BufferAllocator,Buffer>> deframerSupplier,
BufferAllocator allocator)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
PublisherSource.Subscriber<? super Buffer> |
apply(PublisherSource.Subscriber<? super Iterable<T>> subscriber) |
public FramedDeserializerOperator(Deserializer<T> deserializer, Supplier<BiFunction<Buffer,BufferAllocator,Buffer>> deframerSupplier, BufferAllocator allocator)
deserializer - The Deserializer to deserialize each individual item.deframerSupplier - Provides a Function for each
subscribe which is invoked each time a Buffer arrives. The
Function is expected to return the a Buffer with enough data that the Deserializer can
deserialize, or null if there isn't enough data.allocator - Used to allocate Buffers to aggregate data across deserialization calls if necessary.public PublisherSource.Subscriber<? super Buffer> apply(PublisherSource.Subscriber<? super Iterable<T>> subscriber)