public class JsonParser extends Object implements ReadStream<JsonEvent>, Handler<Buffer>
exceptionHandler(io.vertx.core.Handler<java.lang.Throwable>)
is called with
the cause of the failure and the current handling stops. After such event, the parser should not handle data
anymore.
NOTE: This class has been automatically generated from the original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<JsonParser> |
__TYPE_ARG |
Constructor and Description |
---|
JsonParser(JsonParser delegate) |
JsonParser(Object delegate) |
Modifier and Type | Method and Description |
---|---|
JsonParser |
arrayEventMode()
Flip the parser to emit a stream of events for each new json array.
|
JsonParser |
arrayValueMode()
Flip the parser to emit a single value event for each new json array.
|
void |
end()
End the stream, this must be called after all the json stream has been processed.
|
JsonParser |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
boolean |
equals(Object o) |
JsonParser |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
JsonParser |
fetch(long amount)
Fetch the specified
amount of elements. |
JsonParser |
getDelegate() |
void |
handle(Buffer event)
Something has happened, so handle it.
|
JsonParser |
handler(Handler<JsonEvent> handler)
Set a data handler.
|
int |
hashCode() |
static JsonParser |
newInstance(JsonParser arg) |
static JsonParser |
newParser()
Create a new
JsonParser instance. |
static JsonParser |
newParser(Flowable<Buffer> stream)
Create a new
JsonParser instance. |
JsonParser |
objectEventMode()
Flip the parser to emit a stream of events for each new json object.
|
JsonParser |
objectValueMode()
Flip the parser to emit a single value event for each new json object.
|
JsonParser |
pause()
Pause the
ReadStream , it sets the buffer in fetch mode and clears the actual demand. |
Pipe<JsonEvent> |
pipe()
Pause this stream and return a to transfer the elements of this stream to a destination .
|
Completable |
pipeTo(WriteStream<JsonEvent> dst)
Pipe this
ReadStream to the WriteStream . |
JsonParser |
resume()
Resume reading, and sets the buffer in
flowing mode. |
Completable |
rxPipeTo(WriteStream<JsonEvent> dst)
Pipe this
ReadStream to the WriteStream . |
Flowable<JsonEvent> |
toFlowable() |
Observable<JsonEvent> |
toObservable() |
String |
toString() |
JsonParser |
write(Buffer buffer)
Handle a
Buffer , pretty much like calling Handler . |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance, newInstance
newInstance
public static final io.vertx.lang.rx.TypeArg<JsonParser> __TYPE_ARG
public JsonParser(JsonParser delegate)
public JsonParser(Object delegate)
public JsonParser getDelegate()
getDelegate
in interface ReadStream<JsonEvent>
getDelegate
in interface StreamBase
public Observable<JsonEvent> toObservable()
toObservable
in interface ReadStream<JsonEvent>
public Flowable<JsonEvent> toFlowable()
toFlowable
in interface ReadStream<JsonEvent>
public void handle(Buffer event)
public Pipe<JsonEvent> pipe()
WriteStream
.pipe
in interface ReadStream<JsonEvent>
public Completable pipeTo(WriteStream<JsonEvent> dst)
ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
pipeTo
in interface ReadStream<JsonEvent>
dst
- the destination write streampublic Completable rxPipeTo(WriteStream<JsonEvent> dst)
ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
rxPipeTo
in interface ReadStream<JsonEvent>
dst
- the destination write streampublic static JsonParser newParser()
JsonParser
instance.public static JsonParser newParser(Flowable<Buffer> stream)
JsonParser
instance.stream
- public JsonParser write(Buffer buffer)
Buffer
, pretty much like calling Handler
.buffer
- public void end()
public JsonParser objectEventMode()
public JsonParser objectValueMode()
public JsonParser arrayEventMode()
public JsonParser arrayValueMode()
public JsonParser pause()
ReadStream
ReadStream
, it sets the buffer in fetch
mode and clears the actual demand.
While it's paused, no data will be sent to the data handler
.
pause
in interface ReadStream<JsonEvent>
public JsonParser resume()
ReadStream
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface ReadStream<JsonEvent>
public JsonParser fetch(long amount)
ReadStream
amount
of elements. If the ReadStream
has been paused, reading will
recommence with the specified amount
of items, otherwise the specified amount
will
be added to the current stream demand.fetch
in interface ReadStream<JsonEvent>
public JsonParser endHandler(Handler<Void> endHandler)
ReadStream
endHandler
in interface ReadStream<JsonEvent>
public JsonParser handler(Handler<JsonEvent> handler)
ReadStream
handler
in interface ReadStream<JsonEvent>
public JsonParser exceptionHandler(Handler<Throwable> handler)
ReadStream
exceptionHandler
in interface ReadStream<JsonEvent>
exceptionHandler
in interface StreamBase
handler
- the exception handlerpublic static JsonParser newInstance(JsonParser arg)
Copyright © 2024 Eclipse. All rights reserved.