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()
Default constructor.
|
JacksonProcessor(com.fasterxml.jackson.databind.DeserializationConfig deserializationConfig)
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.
|
JacksonProcessor(com.fasterxml.jackson.core.JsonFactory jsonFactory,
boolean streamArray,
com.fasterxml.jackson.databind.DeserializationConfig deserializationConfig)
Creates a new JacksonProcessor.
|
JacksonProcessor(com.fasterxml.jackson.core.JsonFactory jsonFactory,
com.fasterxml.jackson.databind.DeserializationConfig deserializationConfig)
Construct with given JSON factory.
|
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
public JacksonProcessor(com.fasterxml.jackson.core.JsonFactory jsonFactory, boolean streamArray, @Nullable com.fasterxml.jackson.databind.DeserializationConfig deserializationConfig)
jsonFactory
- The JSON factorystreamArray
- Whether arrays should be streameddeserializationConfig
- The jackson deserialization configurationpublic 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, com.fasterxml.jackson.databind.DeserializationConfig deserializationConfig)
jsonFactory
- To configure and construct reader (aka parser, JsonParser
)
and writer (aka generator, JsonGenerator
) instances.deserializationConfig
- The jackson deserialization configurationpublic JacksonProcessor(com.fasterxml.jackson.core.JsonFactory jsonFactory)
jsonFactory
- To configure and construct reader (aka parser, JsonParser
)
and writer (aka generator, JsonGenerator
) instances.public JacksonProcessor(com.fasterxml.jackson.databind.DeserializationConfig deserializationConfig)
deserializationConfig
- The jackson deserialization configurationpublic 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