public class JacksonProcessor extends SingleThreadedBufferingProcessor<byte[],com.fasterxml.jackson.databind.JsonNode>
JsonNode
once the JSON has been fully consumed.
Uses NonBlockingJsonParser
internally allowing the parsing of
JSON from an incoming stream of bytes in a non-blocking mannerSingleThreadedBufferingSubscriber.BackPressureState, SingleThreadedBufferingSubscriber.DownstreamSubscription
upstreamBuffer, upstreamDemand, upstreamState, upstreamSubscription
Constructor and Description |
---|
JacksonProcessor()
Construct with default JSON factory.
|
JacksonProcessor(com.fasterxml.jackson.core.JsonFactory jsonFactory)
Construct with given JSON factory.
|
JacksonProcessor(com.fasterxml.jackson.core.JsonFactory jsonFactory,
boolean streamArray)
Creates a new JacksonProcessor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doOnComplete()
Implement
Subscriber.onComplete() . |
boolean |
needMoreInput() |
protected void |
onUpstreamMessage(byte[] message)
Called when an message is received from the upstream
Subscriber . |
currentDownstreamSubscriber, doOnError, doOnNext, doOnSubscribe, getDownstreamSubscriber, subscribe, subscribeDownstream
newDownstreamSubscription, onComplete, onError, onNext, onSubscribe, provideDownstreamSubscription
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onComplete, onError, onNext, onSubscribe
public JacksonProcessor(com.fasterxml.jackson.core.JsonFactory jsonFactory, boolean streamArray)
jsonFactory
- The JSON factorystreamArray
- Whether arrays should be streamedpublic JacksonProcessor(com.fasterxml.jackson.core.JsonFactory jsonFactory)
jsonFactory
- To configure and construct reader (aka parser, JsonParser
)
and writer (aka generator, JsonGenerator
) instances.public JacksonProcessor()
public boolean needMoreInput()
protected void doOnComplete()
SingleThreadedBufferingSubscriber
Subscriber.onComplete()
.doOnComplete
in class SingleThreadedBufferingProcessor<byte[],com.fasterxml.jackson.databind.JsonNode>
protected void onUpstreamMessage(byte[] message)
SingleThreadedBufferingProcessor
Subscriber
.onUpstreamMessage
in class SingleThreadedBufferingProcessor<byte[],com.fasterxml.jackson.databind.JsonNode>
message
- The message