Class AmqpSender
- All Implemented Interfaces:
MutinyDelegate
,StreamBase
,WriteStream<AmqpMessage>
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()
io.smallrye.mutiny.Uni<Void>
close()
Closes the sender.Blocking variant ofclose()
.void
Variant ofclose()
that ignores the result of the operation.drainHandler
(Runnable arg0) io.smallrye.mutiny.Uni<Void>
end()
Same asWriteStream.end()
but with anhandler
called when the operation completesio.smallrye.mutiny.Uni<Void>
end
(AmqpMessage data) Same as but with anhandler
called when the operation completesBlocking variant ofWriteStream.end()
.endAndAwait
(AmqpMessage data) Blocking variant ofWriteStream.end(T)
.void
Variant ofWriteStream.end()
that ignores the result of the operation.void
endAndForget
(AmqpMessage data) Variant ofWriteStream.end(T)
that ignores the result of the operation.boolean
exceptionHandler
(Consumer<Throwable> handler) io.vertx.amqp.AmqpSender
int
hashCode()
static AmqpSender
newInstance
(io.vertx.amqp.AmqpSender arg) long
send
(AmqpMessage message) io.smallrye.mutiny.Uni<Void>
sendWithAck
(AmqpMessage message) Sends an AMQP message and waits for an acknowledgement.sendWithAckAndAwait
(AmqpMessage message) Blocking variant ofsendWithAck(io.vertx.mutiny.amqp.AmqpMessage)
.sendWithAckAndForget
(AmqpMessage message) Variant ofsendWithAck(io.vertx.mutiny.amqp.AmqpMessage)
that ignores the result of the operation.setWriteQueueMaxSize
(int maxSize) toString()
io.vertx.proton.ProtonSender
unwrap()
io.smallrye.mutiny.Uni<Void>
write
(AmqpMessage arg0) Same as but with anhandler
called when the operation completeswriteAndAwait
(AmqpMessage arg0) Blocking variant ofWriteStream.write(T)
.void
writeAndForget
(AmqpMessage arg0) Variant ofWriteStream.write(T)
that ignores the result of the operation.boolean
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
AmqpSender
public AmqpSender(io.vertx.amqp.AmqpSender delegate) -
AmqpSender
-
-
Method Details
-
getDelegate
public io.vertx.amqp.AmqpSender getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Specified by:
getDelegate
in interfaceStreamBase
- Specified by:
getDelegate
in interfaceWriteStream<AmqpMessage>
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
toSubscriber
-
write
Description copied from interface:WriteStream
Same as but with anhandler
called when the operation completesUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
write
in interfaceWriteStream<AmqpMessage>
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
writeAndAwait
Description copied from interface:WriteStream
Blocking variant ofWriteStream.write(T)
.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:
writeAndAwait
in interfaceWriteStream<AmqpMessage>
- Returns:
- the Void instance produced by the operation.
-
writeAndForget
Description copied from interface:WriteStream
Variant ofWriteStream.write(T)
that ignores the result of the operation.This method subscribes on the result of
WriteStream.write(T)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromWriteStream.write(T)
but you don't need to compose it with other operations.- Specified by:
writeAndForget
in interfaceWriteStream<AmqpMessage>
-
end
Description copied from interface:WriteStream
Same asWriteStream.end()
but with anhandler
called when the operation completesUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
end
in interfaceWriteStream<AmqpMessage>
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
endAndAwait
Description copied from interface:WriteStream
Blocking variant ofWriteStream.end()
.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:
endAndAwait
in interfaceWriteStream<AmqpMessage>
- Returns:
- the Void instance produced by the operation.
-
endAndForget
public void endAndForget()Description copied from interface:WriteStream
Variant ofWriteStream.end()
that ignores the result of the operation.This method subscribes on the result of
WriteStream.end()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromWriteStream.end()
but you don't need to compose it with other operations.- Specified by:
endAndForget
in interfaceWriteStream<AmqpMessage>
-
end
Description copied from interface:WriteStream
Same as but with anhandler
called when the operation completesUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
end
in interfaceWriteStream<AmqpMessage>
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
endAndAwait
Description copied from interface:WriteStream
Blocking variant ofWriteStream.end(T)
.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:
endAndAwait
in interfaceWriteStream<AmqpMessage>
- Returns:
- the Void instance produced by the operation.
-
endAndForget
Description copied from interface:WriteStream
Variant ofWriteStream.end(T)
that ignores the result of the operation.This method subscribes on the result of
WriteStream.end(T)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromWriteStream.end(T)
but you don't need to compose it with other operations.- Specified by:
endAndForget
in interfaceWriteStream<AmqpMessage>
-
writeQueueFull
public boolean writeQueueFull()- Specified by:
writeQueueFull
in interfaceWriteStream<AmqpMessage>
- Returns:
true
if write queue is full
-
drainHandler
- Specified by:
drainHandler
in interfaceWriteStream<AmqpMessage>
- Parameters:
arg0
- the handler- Returns:
-
exceptionHandler
- Specified by:
exceptionHandler
in interfaceStreamBase
- Specified by:
exceptionHandler
in interfaceWriteStream<AmqpMessage>
- Parameters:
handler
- the exception handler- Returns:
-
setWriteQueueMaxSize
- Specified by:
setWriteQueueMaxSize
in interfaceWriteStream<AmqpMessage>
- Parameters:
maxSize
- the max size of the write stream- Returns:
- a reference to this, so the API can be used fluently
-
send
- Parameters:
message
- the message, must not benull
- Returns:
- the current sender
-
sendWithAck
Sends an AMQP message and waits for an acknowledgement. The acknowledgement handler is called with an marked as failed if the message has been rejected or re-routed. If the message has been accepted, the handler is called with a success.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
message
- the message, must not benull
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
sendWithAckAndAwait
Blocking variant ofsendWithAck(io.vertx.mutiny.amqp.AmqpMessage)
.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).
- Parameters:
message
- the message, must not benull
- Returns:
- the Void instance produced by the operation.
-
sendWithAckAndForget
Variant ofsendWithAck(io.vertx.mutiny.amqp.AmqpMessage)
that ignores the result of the operation.This method subscribes on the result of
sendWithAck(io.vertx.mutiny.amqp.AmqpMessage)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromsendWithAck(io.vertx.mutiny.amqp.AmqpMessage)
but you don't need to compose it with other operations.- Parameters:
message
- the message, must not benull
- Returns:
- the instance of AmqpSender to chain method calls.
-
close
Closes the sender.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
Blocking variant ofclose()
.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).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public void closeAndForget() -
address
- Returns:
- the configured address.
-
connection
- Returns:
- the connection having created the sender.
-
remainingCredits
public long remainingCredits()- Returns:
- the remaining credit, 0 is none.
-
unwrap
public io.vertx.proton.ProtonSender unwrap()- Returns:
- the underlying ProtonSender.
-
newInstance
-