@Internal
public abstract class BufferingJsonNodeProcessor
extends java.lang.Object
JsonMapper.createReactiveParser(java.util.function.Consumer, boolean).| Constructor and Description |
|---|
BufferingJsonNodeProcessor(java.util.function.Consumer<org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode>> onSubscribe,
boolean streamArray)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
complete(java.util.Collection<io.micronaut.json.tree.JsonNode> out) |
void |
onComplete() |
void |
onError(java.lang.Throwable t) |
void |
onNext(T t) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
protected abstract io.micronaut.json.tree.JsonNode |
parseOne(java.io.InputStream is)
Parse a single node from the given stream.
|
protected void |
spread(byte[] bytes,
java.util.Collection<io.micronaut.json.tree.JsonNode> out) |
void |
subscribe(org.reactivestreams.Subscriber<? super io.micronaut.json.tree.JsonNode> s) |
public BufferingJsonNodeProcessor(java.util.function.Consumer<org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode>> onSubscribe,
boolean streamArray)
onSubscribe - The onSubscribe callback.streamArray - Whether to stream an array.public void subscribe(org.reactivestreams.Subscriber<? super io.micronaut.json.tree.JsonNode> s)
subscribe in interface org.reactivestreams.Publisher<io.micronaut.json.tree.JsonNode>protected void spread(byte[] bytes,
java.util.Collection<io.micronaut.json.tree.JsonNode> out)
throws java.io.IOException
java.io.IOExceptionprotected void complete(java.util.Collection<io.micronaut.json.tree.JsonNode> out)
throws java.io.IOException
java.io.IOException@NonNull
protected abstract io.micronaut.json.tree.JsonNode parseOne(@NonNull
java.io.InputStream is)
throws java.io.IOException
is - The input streamjava.io.IOException - if an error occurspublic final void onSubscribe(org.reactivestreams.Subscription s)
onSubscribe in interface org.reactivestreams.Subscriber<T>public final void onNext(T t)
onNext in interface org.reactivestreams.Subscriber<T>public final void onError(java.lang.Throwable t)
onError in interface org.reactivestreams.Subscriber<T>public final void onComplete()
onComplete in interface org.reactivestreams.Subscriber<T>