Class MessageConsumer<T>
- All Implemented Interfaces:
RxDelegate,ReadStream<Message<T>>,StreamBase
EventBus address that can
be read from.
The EventBus.consumer(io.vertx.core.eventbus.MessageConsumerOptions) or EventBus.localConsumer(java.lang.String)
creates a new consumer, the returned consumer is not yet registered against the event bus. Registration
is effective after the handler(io.vertx.core.Handler<io.vertx.rxjava3.core.eventbus.Message<T>>) method is invoked.
The consumer is unregistered from the event bus using the unregister() method or by calling the
handler(io.vertx.core.Handler<io.vertx.rxjava3.core.eventbus.Message<T>>) with a null value..
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageConsumer(MessageConsumer delegate) MessageConsumer(Object delegate, TypeArg<T> typeArg_0) -
Method Summary
Modifier and TypeMethodDescriptionaddress()io.reactivex.rxjava3.core.CompletableendHandler(Handler<Void> endHandler) Set an end handler.booleanexceptionHandler(Handler<Throwable> handler) Set an exception handler on the read stream.fetch(long amount) Fetch the specifiedamountof elements.Set a data handler.inthashCode()booleanstatic <T> MessageConsumer<T>static <T> MessageConsumer<T>newInstance(MessageConsumer arg, TypeArg<T> __typeArg_T) pause()Pause theReadStream, it sets the buffer infetchmode and clears the actual demand.pipe()Pause this stream and return a to transfer the elements of this stream to a destination .io.reactivex.rxjava3.core.CompletablepipeTo(WriteStream<Message<T>> dst) Pipe thisReadStreamto theWriteStream.resume()Resume reading, and sets the buffer inflowingmode.io.reactivex.rxjava3.core.Completableio.reactivex.rxjava3.core.CompletablerxPipeTo(WriteStream<Message<T>> dst) Pipe thisReadStreamto theWriteStream.io.reactivex.rxjava3.core.CompletableUnregisters the handler which created this registrationtoString()io.reactivex.rxjava3.core.CompletableUnregisters the handler which created this registration
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
-
Constructor Details
-
MessageConsumer
-
MessageConsumer
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceReadStream<T>- Specified by:
getDelegatein interfaceRxDelegate- Specified by:
getDelegatein interfaceStreamBase
-
toObservable
- Specified by:
toObservablein interfaceReadStream<T>
-
toFlowable
- Specified by:
toFlowablein interfaceReadStream<T>
-
pipe
Pause this stream and return a to transfer the elements of this stream to a destination . The stream will be resumed when the pipe will be wired to aWriteStream.- Specified by:
pipein interfaceReadStream<T>- 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.
- Specified by:
pipeToin interfaceReadStream<T>- Parameters:
dst- the destination write stream- Returns:
- a future notified when the write stream will be ended with the outcome
-
rxPipeTo
Pipe thisReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
- Specified by:
rxPipeToin interfaceReadStream<T>- Parameters:
dst- the destination write stream- Returns:
- a future notified when the write stream will be ended with the outcome
-
exceptionHandler
Description copied from interface:ReadStreamSet an exception handler on the read stream.- Specified by:
exceptionHandlerin interfaceReadStream<T>- Specified by:
exceptionHandlerin interfaceStreamBase- Parameters:
handler- the exception handler- Returns:
- a reference to this, so the API can be used fluently
-
handler
Description copied from interface:ReadStreamSet a data handler. As data is read, the handler will be called with the data.- Specified by:
handlerin interfaceReadStream<T>- Returns:
- a reference to this, so the API can be used fluently
-
pause
Description copied from interface:ReadStreamPause theReadStream, it sets the buffer infetchmode and clears the actual demand.While it's paused, no data will be sent to the data
handler.- Specified by:
pausein interfaceReadStream<T>- Returns:
- a reference to this, so the API can be used fluently
-
resume
Description copied from interface:ReadStreamResume reading, and sets the buffer inflowingmode. If theReadStreamhas been paused, reading will recommence on it.- Specified by:
resumein interfaceReadStream<T>- Returns:
- a reference to this, so the API can be used fluently
-
fetch
Description copied from interface:ReadStreamFetch the specifiedamountof elements. If theReadStreamhas been paused, reading will recommence with the specifiedamountof items, otherwise the specifiedamountwill be added to the current stream demand.- Specified by:
fetchin interfaceReadStream<T>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
Description copied from interface:ReadStreamSet an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.- Specified by:
endHandlerin interfaceReadStream<T>- Returns:
- a reference to this, so the API can be used fluently
-
bodyStream
- Returns:
- a read stream for the body of the message stream.
-
isRegistered
public boolean isRegistered()- Returns:
- true if the current consumer is registered
-
address
- Returns:
- The address the handler was registered with.
-
completion
public io.reactivex.rxjava3.core.Completable completion()- Returns:
- a future notified when the message consumer is registered
-
rxCompletion
public io.reactivex.rxjava3.core.Completable rxCompletion()- Returns:
- a future notified when the message consumer is registered
-
unregister
public io.reactivex.rxjava3.core.Completable unregister()Unregisters the handler which created this registration- Returns:
- a future notified when the unregistation is done
-
rxUnregister
public io.reactivex.rxjava3.core.Completable rxUnregister()Unregisters the handler which created this registration- Returns:
- a future notified when the unregistation is done
-
newInstance
-
newInstance
-