Package org.apache.qpid.protonj2.client
Interface Sender
-
- All Superinterfaces:
AutoCloseable,Link<Sender>
- All Known Implementing Classes:
ClientSender
public interface Sender extends Link<Sender>
AMQP Sender that provides an API for sending complete Message payload data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Trackersend(Message<?> message)Send the given message immediately if there is credit available or blocks if the link has not yet been granted credit.Trackersend(Message<?> message, Map<String,Object> deliveryAnnotations)Send the given message immediately if there is credit available or blocks if the link has not yet been granted credit.TrackertrySend(Message<?> message)Send the given message if credit is available or returns null if no credit has been granted to the link at the time of the send attempt.TrackertrySend(Message<?> message, Map<String,Object> deliveryAnnotations)Send the given message if credit is available or returns null if no credit has been granted to the link at the time of the send attempt.-
Methods inherited from interface org.apache.qpid.protonj2.client.Link
address, client, close, close, closeAsync, closeAsync, connection, desiredCapabilities, detach, detach, detachAsync, detachAsync, offeredCapabilities, openFuture, properties, session, source, target
-
-
-
-
Method Detail
-
send
Tracker send(Message<?> message) throws ClientException
Send the given message immediately if there is credit available or blocks if the link has not yet been granted credit.- Parameters:
message- theMessageto send.- Returns:
- the
Trackerfor the message delivery - Throws:
ClientException- if an error occurs while initiating the send operation.
-
send
Tracker send(Message<?> message, Map<String,Object> deliveryAnnotations) throws ClientException
Send the given message immediately if there is credit available or blocks if the link has not yet been granted credit. The provided delivery annotations are encoded along with the message, the annotations can be passed repeatedly to send calls if sending the same delivery annotations with each message.- Parameters:
message- theMessageto send.deliveryAnnotations- the delivery annotations that should be included in the sentMessage.- Returns:
- the
Trackerfor the message delivery - Throws:
ClientException- if an error occurs while initiating the send operation.
-
trySend
Tracker trySend(Message<?> message) throws ClientException
Send the given message if credit is available or returns null if no credit has been granted to the link at the time of the send attempt.- Parameters:
message- theMessageto send if credit is available.- Returns:
- the
Trackerfor the message delivery or null if no credit for sending. - Throws:
ClientException- if an error occurs while initiating the send operation.
-
trySend
Tracker trySend(Message<?> message, Map<String,Object> deliveryAnnotations) throws ClientException
Send the given message if credit is available or returns null if no credit has been granted to the link at the time of the send attempt. The provided delivery annotations are encoded along with the message, the annotations can be passed repeatedly to send calls if sending the same delivery annotations with each message.- Parameters:
message- theMessageto send if credit is available.deliveryAnnotations- the delivery annotations that should be included in the sentMessage.- Returns:
- the
Trackerfor the message delivery or null if no credit for sending. - Throws:
ClientException- if an error occurs while initiating the send operation.
-
-