Class JsonParser
- All Implemented Interfaces:
MutinyDelegate,io.vertx.core.Handler<Buffer>,ReadStream<JsonEvent>,StreamBase,Consumer<Buffer>
exceptionHandler(java.util.function.Consumer<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 Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJsonParser(io.vertx.core.parsetools.JsonParser delegate) JsonParser(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidend()endHandler(Runnable endHandler) booleanexceptionHandler(Consumer<Throwable> handler) fetch(long amount) io.vertx.core.parsetools.JsonParservoidinthashCode()static JsonParsernewInstance(io.vertx.core.parsetools.JsonParser arg) static JsonParserstatic JsonParsernewParser(ReadStream<Buffer> stream) static JsonParsernewParser(Flow.Publisher<Buffer> stream) pause()pipe()io.smallrye.mutiny.Uni<Void>pipeTo(WriteStream<JsonEvent> dst) Pipe thisReadStreamto theWriteStream.Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).voidVariant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.resume()io.smallrye.mutiny.Multi<JsonEvent>toMulti()toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
JsonParser
public JsonParser(io.vertx.core.parsetools.JsonParser delegate) -
JsonParser
-
-
Method Details
-
getDelegate
public io.vertx.core.parsetools.JsonParser getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Specified by:
getDelegatein interfaceReadStream<JsonEvent>- Specified by:
getDelegatein interfaceStreamBase- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
handle
- Specified by:
handlein interfaceio.vertx.core.Handler<Buffer>- Parameters:
event- the event to handle
-
pipe
- Specified by:
pipein interfaceReadStream<JsonEvent>- Returns:
- a pipe
-
pipeTo
Pipe thisReadStreamto theWriteStream.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
handlerwill be called with the result.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeToin interfaceReadStream<JsonEvent>- Parameters:
dst- the destination write stream- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
pipeToAndAwaitin interfaceReadStream<JsonEvent>- Parameters:
dst- the destination write stream- Returns:
- the Void instance produced by the operation.
-
pipeToAndForget
Variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.This method subscribes on the result of
ReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)but you don't need to compose it with other operations.- Specified by:
pipeToAndForgetin interfaceReadStream<JsonEvent>- Parameters:
dst- the destination write stream
-
newParser
- Returns:
-
newParser
- Parameters:
stream-- Returns:
-
newParser
- Parameters:
stream-- Returns:
-
write
- Parameters:
buffer-- Returns:
- a reference to this, so the API can be used fluently
-
end
public void end() -
objectEventMode
- Returns:
- a reference to this, so the API can be used fluently
-
objectValueMode
- Returns:
- a reference to this, so the API can be used fluently
-
arrayEventMode
- Returns:
- a reference to this, so the API can be used fluently
-
arrayValueMode
- Returns:
- a reference to this, so the API can be used fluently
-
pause
- Specified by:
pausein interfaceReadStream<JsonEvent>- Returns:
- a reference to this, so the API can be used fluently
-
resume
- Specified by:
resumein interfaceReadStream<JsonEvent>- Returns:
- a reference to this, so the API can be used fluently
-
fetch
- Specified by:
fetchin interfaceReadStream<JsonEvent>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
- Specified by:
endHandlerin interfaceReadStream<JsonEvent>- Returns:
-
handler
- Specified by:
handlerin interfaceReadStream<JsonEvent>- Returns:
-
exceptionHandler
- Specified by:
exceptionHandlerin interfaceReadStream<JsonEvent>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
handler- the exception handler- Returns:
-
toMulti
- Specified by:
toMultiin interfaceReadStream<JsonEvent>
-
toBlockingIterable
-
toBlockingStream
-
accept
-
newInstance
-