Package io.micronaut.jackson.core.parser
Class JacksonCoreProcessor
- java.lang.Object
-
- io.micronaut.core.async.subscriber.SingleThreadedBufferingSubscriber<R>
-
- io.micronaut.core.async.processor.SingleThreadedBufferingProcessor<byte[],io.micronaut.json.tree.JsonNode>
-
- io.micronaut.jackson.core.parser.JacksonCoreProcessor
-
- All Implemented Interfaces:
io.micronaut.core.async.subscriber.Completable
,io.micronaut.core.async.subscriber.Emitter<byte[]>
,org.reactivestreams.Processor<byte[],io.micronaut.json.tree.JsonNode>
,org.reactivestreams.Publisher<io.micronaut.json.tree.JsonNode>
,org.reactivestreams.Subscriber<byte[]>
@Internal public class JacksonCoreProcessor extends io.micronaut.core.async.processor.SingleThreadedBufferingProcessor<byte[],io.micronaut.json.tree.JsonNode>
A Reactive streams publisher that publishes aJsonNode
once the JSON has been fully consumed. UsesNonBlockingJsonParser
internally allowing the parsing of JSON from an incoming stream of bytes in a non-blocking manner- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description JacksonCoreProcessor(boolean streamArray, com.fasterxml.jackson.core.JsonFactory jsonFactory, io.micronaut.json.JsonStreamConfig deserializationConfig)
Creates a new JacksonProcessor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doOnComplete()
boolean
needMoreInput()
protected void
onUpstreamMessage(byte[] message)
-
Methods inherited from class io.micronaut.core.async.processor.SingleThreadedBufferingProcessor
currentDownstreamSubscriber, doOnError, doOnNext, doOnSubscribe, getDownstreamSubscriber, subscribe, subscribeDownstream
-
Methods inherited from class io.micronaut.core.async.subscriber.SingleThreadedBufferingSubscriber
newDownstreamSubscription, onComplete, onError, onNext, onSubscribe, provideDownstreamSubscription
-
-
-
-
Constructor Detail
-
JacksonCoreProcessor
public JacksonCoreProcessor(boolean streamArray, com.fasterxml.jackson.core.JsonFactory jsonFactory, @NonNull io.micronaut.json.JsonStreamConfig deserializationConfig)
Creates a new JacksonProcessor.- Parameters:
streamArray
- Whether arrays should be streamedjsonFactory
- Factory to use for creating the parserdeserializationConfig
- The deserialization configuration (in particular bignum handling)
-
-
Method Detail
-
needMoreInput
public boolean needMoreInput()
- Returns:
- Whether more input is needed
-
doOnComplete
protected void doOnComplete()
- Overrides:
doOnComplete
in classio.micronaut.core.async.processor.SingleThreadedBufferingProcessor<byte[],io.micronaut.json.tree.JsonNode>
-
onUpstreamMessage
protected void onUpstreamMessage(byte[] message)
- Specified by:
onUpstreamMessage
in classio.micronaut.core.async.processor.SingleThreadedBufferingProcessor<byte[],io.micronaut.json.tree.JsonNode>
-
-