Package org.apache.qpid.protonj2.client
Interface StreamSender
-
- All Superinterfaces:
java.lang.AutoCloseable,Link<StreamSender>
- All Known Implementing Classes:
ClientStreamSender
public interface StreamSender extends Link<StreamSender>
Sending link implementation that allows sending of large message payload data in multiple transfers to reduce memory overhead of large message sends.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StreamSenderMessagebeginMessage()Creates and returns a newStreamSenderMessagethat can be used by the caller to perform streaming sends of large message payload data.StreamSenderMessagebeginMessage(java.util.Map<java.lang.String,java.lang.Object> deliveryAnnotations)Creates and returns a newStreamSenderMessagethat can be used by the caller to perform streaming sends of large message payload data.StreamTrackersend(Message<?> message)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.StreamTrackersend(Message<?> message, java.util.Map<java.lang.String,java.lang.Object> deliveryAnnotations)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..StreamTrackertrySend(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 or a streaming send is ongoing.StreamTrackertrySend(Message<?> message, java.util.Map<java.lang.String,java.lang.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
StreamTracker 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 or there is a streaming send ongoing.- Parameters:
message- theMessageto send.- Returns:
- the
Trackerfor the message delivery - Throws:
ClientException- if an error occurs while initiating the send operation.
-
send
StreamTracker send(Message<?> message, java.util.Map<java.lang.String,java.lang.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 or there is a streaming send ongoing..- Parameters:
message- theMessageto send.deliveryAnnotations- the delivery annotations that should be included in the sentMessage.- Returns:
- the
StreamTrackerfor the message delivery - Throws:
ClientException- if an error occurs while initiating the send operation.
-
trySend
StreamTracker 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 or a streaming send is ongoing.- Parameters:
message- theMessageto 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.
-
trySend
StreamTracker trySend(Message<?> message, java.util.Map<java.lang.String,java.lang.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.- Parameters:
message- theMessageto send if credit is available.deliveryAnnotations- the delivery annotations that should be included in the sentMessage.- Returns:
- the
StreamTrackerfor the message delivery or null if no credit for sending. - Throws:
ClientException- if an error occurs while initiating the send operation.
-
beginMessage
StreamSenderMessage beginMessage() throws ClientException
Creates 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.
-
beginMessage
StreamSenderMessage beginMessage(java.util.Map<java.lang.String,java.lang.Object> deliveryAnnotations) throws ClientException
Creates and returns a newStreamSenderMessagethat can be used by the caller to perform streaming sends of large message payload data.- Parameters:
deliveryAnnotations- the delivery annotations that should be included in the sentStreamSenderMessage.- 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.
-
-