Class ClientStreamTracker

    • Method Detail

      • awaitSettlement

        public StreamTracker awaitSettlement​(long timeout,
                                             java.util.concurrent.TimeUnit unit)
                                      throws ClientException
        Description copied from interface: Tracker
        Waits if necessary for the remote to settle the sent delivery unless it has either already been settled or the original delivery was sent settled in which case the remote will not send a Disposition back.
        Specified by:
        awaitSettlement in interface StreamTracker
        Specified by:
        awaitSettlement in interface Tracker
        Parameters:
        timeout - the maximum time to wait for the remote to settle.
        unit - the time unit of the timeout argument.
        Returns:
        this Tracker instance.
        Throws:
        ClientException - if an error occurs while awaiting the remote settlement.
      • state

        public DeliveryState state()
        Description copied from interface: Tracker
        Gets the current local state for the tracked delivery.
        Specified by:
        state in interface Tracker
        Returns:
        the delivery state
      • remoteState

        public DeliveryState remoteState()
        Description copied from interface: Tracker
        Gets the current remote state for the tracked delivery.
        Specified by:
        remoteState in interface Tracker
        Returns:
        the remote DeliveryState once a value is received from the remote.
      • remoteSettled

        public boolean remoteSettled()
        Description copied from interface: Tracker
        Gets whether the delivery was settled by the remote peer yet.
        Specified by:
        remoteSettled in interface Tracker
        Returns:
        whether the delivery is remotely settled
      • settled

        public boolean settled()
        Specified by:
        settled in interface Tracker
        Returns:
        true if the sent message has been locally settled.
      • settlementFuture

        public ClientFuture<Tracker> settlementFuture()
        Description copied from interface: Tracker
        Returns a future that can be used to wait for the remote to acknowledge receipt of a sent message by settling it.
        Specified by:
        settlementFuture in interface Tracker
        Returns:
        a Future that can be used to wait on remote settlement.
      • awaitAccepted

        public Tracker awaitAccepted()
                              throws ClientException
        Description copied from interface: Tracker
        Waits if necessary for the remote to settle the sent delivery with an Accepted disposition unless it has either already been settled and accepted or the original delivery was sent settled in which case the remote will not send a Disposition back.
        Specified by:
        awaitAccepted in interface Tracker
        Returns:
        this Tracker instance.
        Throws:
        ClientDeliveryStateException - if the remote sends a disposition other than Accepted.
        ClientException - if an error occurs while awaiting the remote settlement.
      • awaitAccepted

        public Tracker awaitAccepted​(long timeout,
                                     java.util.concurrent.TimeUnit unit)
                              throws ClientException
        Description copied from interface: Tracker
        Waits if necessary for the remote to settle the sent delivery with an Accepted disposition unless it has either already been settled and accepted or the original delivery was sent settled in which case the remote will not send a Disposition back.
        Specified by:
        awaitAccepted in interface Tracker
        Parameters:
        timeout - the maximum time to wait for the remote to settle.
        unit - the time unit of the timeout argument.
        Returns:
        this Tracker instance.
        Throws:
        ClientDeliveryStateException - if the remote sends a disposition other than Accepted.
        ClientException - if an error occurs while awaiting the remote settlement.