Class ClientOutgoingEnvelope

  • public class ClientOutgoingEnvelope
    extends java.lang.Object
    Tracking object used to manage the life-cycle of a send of message payload to the remote which can be stalled either for link or session credit limits. The envelope carries sufficient information to write payload bytes as credit is available.
    • Constructor Detail

      • ClientOutgoingEnvelope

        public ClientOutgoingEnvelope​(org.apache.qpid.protonj2.client.impl.ClientSender sender,
                                      OutgoingDelivery delivery,
                                      int messageFormat,
                                      ProtonBuffer payload,
                                      boolean complete,
                                      ClientFuture<Tracker> request)
        Create a new In-flight Send instance that is a continuation on an existing delivery.
        sender - The ClientSender instance that is attempting to send this encoded message.
        messageFormat - The message format code to assign the send if this is the first delivery.
        delivery - The OutgoingDelivery context this envelope will be added to.
        payload - The payload that comprises this portion of the send.
        complete - Indicates if the encoded payload represents the complete transfer or if more is coming.
        request - The requesting operation that initiated this send.
    • Method Detail

      • sendTimeout

        public java.util.concurrent.ScheduledFuture<?> sendTimeout()
        the ScheduledFuture used to determine when the send should fail if no credit available to write.
      • sendTimeout

        public void sendTimeout​(java.util.concurrent.ScheduledFuture<?> sendTimeout)
        Sets the ScheduledFuture which should be used when a send cannot be immediately performed.
        sendTimeout - The ScheduledFuture that will fail the send if not cancelled once it has been performed.
      • sender

        public org.apache.qpid.protonj2.client.impl.ClientSender sender()
      • aborted

        public boolean aborted()
      • sendPayload

        public void sendPayload​(DeliveryState state,
                                boolean settled)
      • createSendTimedOutException

        public ClientException createSendTimedOutException()