Interface StreamSender
- All Superinterfaces:
- AutoCloseable,- Link<StreamSender>
- All Known Implementing Classes:
- ClientStreamSender
- 
Method SummaryModifier and TypeMethodDescriptionCreates and returns a newStreamSenderMessagethat can be used by the caller to perform streaming sends of large message payload data.beginMessage(Map<String, Object> deliveryAnnotations) Creates and returns a newStreamSenderMessagethat can be used by the caller to perform streaming sends of large message payload data.Send the given message immediately if there is credit available or blocks if the link has not yet been granted credit or there is a streaming send ongoing.Send the given message immediately if there is credit available or blocks if the link has not yet been granted credit or there is a streaming send ongoing.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 or a streaming send is ongoing.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.Linkaddress, client, close, close, closeAsync, closeAsync, connection, desiredCapabilities, detach, detach, detachAsync, detachAsync, offeredCapabilities, openFuture, properties, session, source, target
- 
Method Details- 
sendSend the given message immediately if there is credit available or blocks if the link has not yet been granted credit or there is a streaming send ongoing.Upon successfully sending the message the methods returns a Trackerthat can be used to await settlement of the message from the remote. If the sender has been configured to send the message pre-settled then the resulting Tracker will immediately report the message as remotely settlement and accepted.- Parameters:
- message- the- Messageto send.
- Returns:
- the Trackerfor the message delivery
- Throws:
- ClientException- if an error occurs while initiating the send operation.
 
- 
sendStreamTracker send(Message<?> message, Map<String, Object> deliveryAnnotations) throws ClientExceptionSend the given message immediately if there is credit available or blocks if the link has not yet been granted credit or there is a streaming send ongoing. 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.Upon successfully sending the message the methods returns a Trackerthat can be used to await settlement of the message from the remote. If the sender has been configured to send the message pre-settled then the resulting Tracker will immediately report the message as remotely settlement and accepted.- Parameters:
- message- the- Messageto send.
- deliveryAnnotations- the delivery annotations that should be included in the sent- Message.
- Returns:
- the StreamTrackerfor the message delivery
- Throws:
- ClientException- if an error occurs while initiating the send operation.
 
- 
trySendSend 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 or a streaming send is ongoing.Upon successfully sending the message the methods returns a Trackerthat can be used to await settlement of the message from the remote. If the sender has been configured to send the message pre-settled then the resulting Tracker will immediately report the message as remotely settlement and accepted.- Parameters:
- message- the- Messageto send if credit is available.
- Returns:
- the StreamTrackerfor the message delivery or null if no credit for sending.
- Throws:
- ClientException- if an error occurs while initiating the send operation.
 
- 
trySendStreamTracker trySend(Message<?> message, Map<String, Object> deliveryAnnotations) throws ClientExceptionSend 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.Upon successfully sending the message the methods returns a Trackerthat can be used to await settlement of the message from the remote. If the sender has been configured to send the message pre-settled then the resulting Tracker will immediately report the message as remotely settlement and accepted.- Parameters:
- message- the- Messageto send if credit is available.
- deliveryAnnotations- the delivery annotations that should be included in the sent- Message.
- Returns:
- the StreamTrackerfor the message delivery or null if no credit for sending.
- Throws:
- ClientException- if an error occurs while initiating the send operation.
 
- 
beginMessageCreates and returns a newStreamSenderMessagethat can be used by the caller to perform streaming sends of large message payload data.- Returns:
- a new StreamSenderMessagethat can be used to stream message data to the remote.
- Throws:
- ClientException- if an error occurs while initiating a new streaming send message.
 
- 
beginMessageCreates and returns a newStreamSenderMessagethat can be used by the caller to perform streaming sends of large message payload data. 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:
- deliveryAnnotations- the delivery annotations that should be included in the sent- StreamSenderMessage.
- Returns:
- a new StreamSenderMessagethat can be used to stream message data to the remote.
- Throws:
- ClientException- if an error occurs while initiating a new streaming send message.
 
 
-