public class RabbitMQConsumer extends Object implements ReadStream<RabbitMQMessage>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<RabbitMQConsumer> |
__TYPE_ARG |
Constructor and Description |
---|
RabbitMQConsumer(Object delegate) |
RabbitMQConsumer(RabbitMQConsumer delegate) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Stop message consumption from a queue.
|
void |
cancel(Handler<AsyncResult<Void>> cancelResult)
Stop message consumption from a queue.
|
Observable<Void> |
cancelObservable()
Deprecated.
use
rxCancel() instead |
String |
consumerTag() |
RabbitMQConsumer |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
boolean |
equals(Object o) |
RabbitMQConsumer |
exceptionHandler(Handler<Throwable> exceptionHandler)
Set an exception handler on the read stream.
|
ReadStream<RabbitMQMessage> |
fetch(long amount)
Fetch the specified
amount of elements. |
RabbitMQConsumer |
getDelegate() |
RabbitMQConsumer |
handler(Handler<RabbitMQMessage> messageArrived)
Set a message handler.
|
int |
hashCode() |
boolean |
isPaused() |
static RabbitMQConsumer |
newInstance(RabbitMQConsumer arg) |
RabbitMQConsumer |
pause()
Pause the stream of incoming messages from queue.
|
Pipe<RabbitMQMessage> |
pipe()
Pause this stream and return a to transfer the elements of this stream to a destination .
|
void |
pipeTo(WriteStream<RabbitMQMessage> dst)
Like
ReadStream.pipeTo(io.vertx.rxjava.core.streams.WriteStream<T>) but with no completion handler. |
void |
pipeTo(WriteStream<RabbitMQMessage> dst,
Handler<AsyncResult<Void>> handler)
Pipe this
ReadStream to the WriteStream . |
Observable<Void> |
pipeToObservable(WriteStream<RabbitMQMessage> dst)
Deprecated.
|
RabbitMQConsumer |
resume()
Resume reading from a queue.
|
Single<Void> |
rxCancel()
Stop message consumption from a queue.
|
Single<Void> |
rxPipeTo(WriteStream<RabbitMQMessage> dst)
Pipe this
ReadStream to the WriteStream . |
Observable<RabbitMQMessage> |
toObservable() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance, newInstance
newInstance
public static final io.vertx.lang.rx.TypeArg<RabbitMQConsumer> __TYPE_ARG
public RabbitMQConsumer(RabbitMQConsumer delegate)
public RabbitMQConsumer(Object delegate)
public RabbitMQConsumer getDelegate()
getDelegate
in interface ReadStream<RabbitMQMessage>
getDelegate
in interface StreamBase
public Observable<RabbitMQMessage> toObservable()
toObservable
in interface ReadStream<RabbitMQMessage>
public ReadStream<RabbitMQMessage> fetch(long amount)
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<RabbitMQMessage>
amount
- public Pipe<RabbitMQMessage> pipe()
WriteStream
.pipe
in interface ReadStream<RabbitMQMessage>
public void pipeTo(WriteStream<RabbitMQMessage> dst)
ReadStream.pipeTo(io.vertx.rxjava.core.streams.WriteStream<T>)
but with no completion handler.pipeTo
in interface ReadStream<RabbitMQMessage>
dst
- public void pipeTo(WriteStream<RabbitMQMessage> dst, Handler<AsyncResult<Void>> handler)
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<RabbitMQMessage>
dst
- the destination write streamhandler
- @Deprecated public Observable<Void> pipeToObservable(WriteStream<RabbitMQMessage> dst)
rxPipeTo(io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.rabbitmq.RabbitMQMessage>)
insteadReadStream
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.
dst
- the destination write streampublic Single<Void> rxPipeTo(WriteStream<RabbitMQMessage> 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.
dst
- the destination write streampublic RabbitMQConsumer exceptionHandler(Handler<Throwable> exceptionHandler)
exceptionHandler
in interface ReadStream<RabbitMQMessage>
exceptionHandler
in interface StreamBase
exceptionHandler
- the exception handlerpublic RabbitMQConsumer handler(Handler<RabbitMQMessage> messageArrived)
handler
in interface ReadStream<RabbitMQMessage>
messageArrived
- public RabbitMQConsumer pause()
The messages will continue to arrive, but they will be stored in a internal queue. If the queue size would exceed the limit provided by , then incoming messages will be discarded.
pause
in interface ReadStream<RabbitMQMessage>
public RabbitMQConsumer resume()
resume
in interface ReadStream<RabbitMQMessage>
public RabbitMQConsumer endHandler(Handler<Void> endHandler)
endHandler
in interface ReadStream<RabbitMQMessage>
endHandler
- public String consumerTag()
public void cancel()
The operation is asynchronous. When consumption will be stopped, you can by notified via endHandler(io.vertx.core.Handler<java.lang.Void>)
public void cancel(Handler<AsyncResult<Void>> cancelResult)
The operation is asynchronous. When consumption will be stopped, you can by notified via endHandler(io.vertx.core.Handler<java.lang.Void>)
cancelResult
- contains information about operation status: success/fail.@Deprecated public Observable<Void> cancelObservable()
rxCancel()
instead
The operation is asynchronous. When consumption will be stopped, you can by notified via endHandler(io.vertx.core.Handler<java.lang.Void>)
public Single<Void> rxCancel()
The operation is asynchronous. When consumption will be stopped, you can by notified via endHandler(io.vertx.core.Handler<java.lang.Void>)
public boolean isPaused()
public static RabbitMQConsumer newInstance(RabbitMQConsumer arg)
Copyright © 2023 Eclipse. All rights reserved.