public class AmqpSender extends Object implements WriteStream<AmqpMessage>
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<AmqpSender> |
__TYPE_ARG |
Constructor and Description |
---|
AmqpSender(AmqpSender delegate) |
AmqpSender(Object delegate) |
Modifier and Type | Method and Description |
---|---|
String |
address() |
Completable |
close()
Closes the sender.
|
AmqpConnection |
connection()
Gets the connection having created the sender.
|
WriteStream<AmqpMessage> |
drainHandler(Handler<Void> handler)
Set a drain handler on the stream.
|
Completable |
end()
Same as
WriteStream.end() but with an handler called when the operation completes |
Completable |
end(AmqpMessage data)
Same as but with an
handler called when the operation completes |
boolean |
equals(Object o) |
AmqpSender |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the write stream.
|
AmqpSender |
getDelegate() |
int |
hashCode() |
static AmqpSender |
newInstance(AmqpSender arg) |
long |
remainingCredits() |
Completable |
rxClose()
Closes the sender.
|
Completable |
rxEnd()
Same as
WriteStream.end() but with an handler called when the operation completes |
Completable |
rxEnd(AmqpMessage data)
Same as but with an
handler called when the operation completes |
Completable |
rxSendWithAck(AmqpMessage message)
Sends an AMQP message and waits for an acknowledgement.
|
Completable |
rxWrite(AmqpMessage data)
Same as but with an
handler called when the operation completes |
AmqpSender |
send(AmqpMessage message)
Sends an AMQP message.
|
Completable |
sendWithAck(AmqpMessage message)
Sends an AMQP message and waits for an acknowledgement.
|
AmqpSender |
setWriteQueueMaxSize(int maxSize)
Set the maximum size of the write queue to
maxSize . |
WriteStreamObserver<AmqpMessage> |
toObserver() |
String |
toString() |
WriteStreamSubscriber<AmqpMessage> |
toSubscriber() |
io.vertx.proton.ProtonSender |
unwrap() |
Completable |
write(AmqpMessage data)
Same as but with an
handler called when the operation completes |
boolean |
writeQueueFull()
This will return
true if there are more bytes in the write queue than the value set using setWriteQueueMaxSize(int) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance, newInstance
newInstance
public static final io.vertx.lang.rx.TypeArg<AmqpSender> __TYPE_ARG
public AmqpSender(AmqpSender delegate)
public AmqpSender(Object delegate)
public AmqpSender getDelegate()
getDelegate
in interface StreamBase
getDelegate
in interface WriteStream<AmqpMessage>
public WriteStreamObserver<AmqpMessage> toObserver()
public WriteStreamSubscriber<AmqpMessage> toSubscriber()
public Completable write(AmqpMessage data)
handler
called when the operation completeswrite
in interface WriteStream<AmqpMessage>
data
- public Completable rxWrite(AmqpMessage data)
handler
called when the operation completesrxWrite
in interface WriteStream<AmqpMessage>
data
- public Completable end()
WriteStream.end()
but with an handler
called when the operation completesend
in interface WriteStream<AmqpMessage>
public Completable rxEnd()
WriteStream.end()
but with an handler
called when the operation completesrxEnd
in interface WriteStream<AmqpMessage>
public Completable end(AmqpMessage data)
handler
called when the operation completesend
in interface WriteStream<AmqpMessage>
data
- public Completable rxEnd(AmqpMessage data)
handler
called when the operation completesrxEnd
in interface WriteStream<AmqpMessage>
data
- public boolean writeQueueFull()
true
if there are more bytes in the write queue than the value set using setWriteQueueMaxSize(int)
writeQueueFull
in interface WriteStream<AmqpMessage>
true
if write queue is fullpublic WriteStream<AmqpMessage> drainHandler(Handler<Void> handler)
The stream implementation defines when the drain handler, for example it could be when the queue size has been
reduced to maxSize / 2
.
drainHandler
in interface WriteStream<AmqpMessage>
handler
- the handlerpublic AmqpSender exceptionHandler(Handler<Throwable> handler)
WriteStream
exceptionHandler
in interface StreamBase
exceptionHandler
in interface WriteStream<AmqpMessage>
handler
- the exception handlerpublic AmqpSender setWriteQueueMaxSize(int maxSize)
WriteStream
maxSize
. You will still be able to write to the stream even
if there is more than maxSize
items in the write queue. This is used as an indicator by classes such as
Pipe
to provide flow control.
The value is defined by the implementation of the stream, e.g in bytes for a
NetSocket
, etc...setWriteQueueMaxSize
in interface WriteStream<AmqpMessage>
maxSize
- the max size of the write streampublic AmqpSender send(AmqpMessage message)
message
- the message, must not be null
public Completable sendWithAck(AmqpMessage message)
message
- the message, must not be null
public Completable rxSendWithAck(AmqpMessage message)
message
- the message, must not be null
public Completable close()
public Completable rxClose()
public String address()
public AmqpConnection connection()
null
public long remainingCredits()
public io.vertx.proton.ProtonSender unwrap()
public static AmqpSender newInstance(AmqpSender arg)
Copyright © 2022 Eclipse. All rights reserved.