public interface AmqpReceiver extends ReadStream<AmqpMessage>
Modifier and Type | Method and Description |
---|---|
String |
address()
The listened address.
|
void |
close(Handler<AsyncResult<Void>> handler)
Closes the receiver.
|
AmqpConnection |
connection()
Gets the connection having created the receiver.
|
AmqpReceiver |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
AmqpReceiver |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
AmqpReceiver |
fetch(long amount)
Fetch the specified
amount of elements. |
AmqpReceiver |
handler(Handler<AmqpMessage> handler)
Set a data handler.
|
AmqpReceiver |
pause()
Pause the
ReadStream , it sets the buffer in fetch mode and clears the actual demand. |
AmqpReceiver |
resume()
Resume reading, and sets the buffer in
flowing mode. |
pipe, pipeTo, pipeTo
AmqpReceiver exceptionHandler(Handler<Throwable> handler)
ReadStream
exceptionHandler
in interface ReadStream<AmqpMessage>
exceptionHandler
in interface StreamBase
handler
- the exception handlerAmqpReceiver handler(Handler<AmqpMessage> handler)
ReadStream
handler
in interface ReadStream<AmqpMessage>
AmqpReceiver 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<AmqpMessage>
AmqpReceiver resume()
ReadStream
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface ReadStream<AmqpMessage>
AmqpReceiver 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<AmqpMessage>
AmqpReceiver endHandler(Handler<Void> endHandler)
ReadStream
endHandler
in interface ReadStream<AmqpMessage>
String address()
null
void close(Handler<AsyncResult<Void>> handler)
handler
- handler called when the receiver has been closed, can be null
AmqpConnection connection()
null
Copyright © 2023 Eclipse. All rights reserved.