Package org.apache.qpid.protonj2.client
Interface StreamTracker
- All Known Implementing Classes:
- ClientNoOpStreamTracker,- ClientStreamTracker
public interface StreamTracker
Special StreamSender related 
Tracker that is linked to any StreamSenderMessage
 instance and provides the Tracker functions for those types of messages.- 
Method SummaryModifier and TypeMethodDescriptionWaits if necessary for the remote to settle the sent delivery with anAccepteddisposition unless it has either already been settled and accepted or the original delivery was sent settled in which case the remote will not send aDispositionback.awaitAccepted(long timeout, TimeUnit unit) Waits if necessary for the remote to settle the sent delivery with anAccepteddisposition unless it has either already been settled and accepted or the original delivery was sent settled in which case the remote will not send aDispositionback.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 aDispositionback.awaitSettlement(long timeout, TimeUnit unit) 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 aDispositionback.disposition(DeliveryState state, boolean settle) Updates the DeliveryState, and optionally settle the delivery as well.booleanGets whether the delivery was settled by the remote peer yet.Gets the current remote state for the tracked delivery.sender()settle()Settles the delivery locally, if notauto-settling.booleansettled()Returns a future that can be used to wait for the remote to acknowledge receipt of a sent message by settling it.state()Gets the current local state for the tracked delivery.
- 
Method Details- 
senderStreamSender sender()- Returns:
- the StreamSenderthat was used to send the delivery that is being tracked.
 
- 
settleSettles the delivery locally, if notauto-settling.- Returns:
- this Trackerinstance.
- Throws:
- ClientException- if an error occurs while performing the settlement.
 
- 
settledboolean settled()- Returns:
- true if the sent message has been locally settled.
 
- 
stateDeliveryState state()Gets the current local state for the tracked delivery.- Returns:
- the delivery state
 
- 
remoteStateDeliveryState remoteState()Gets the current remote state for the tracked delivery.- Returns:
- the remote DeliveryStateonce a value is received from the remote.
 
- 
remoteSettledboolean remoteSettled()Gets whether the delivery was settled by the remote peer yet.- Returns:
- whether the delivery is remotely settled
 
- 
dispositionUpdates the DeliveryState, and optionally settle the delivery as well.- Parameters:
- state- the delivery state to apply
- settle- whether to- settle()the delivery at the same time
- Returns:
- this Trackerinstance.
- Throws:
- ClientException- if an error occurs while applying the given disposition
 
- 
settlementFutureFuture<StreamTracker> settlementFuture()Returns a future that can be used to wait for the remote to acknowledge receipt of a sent message by settling it.- Returns:
- a Futurethat can be used to wait on remote settlement.
 
- 
awaitSettlementWaits 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 aDispositionback.- Returns:
- this Trackerinstance.
- Throws:
- ClientException- if an error occurs while awaiting the remote settlement.
 
- 
awaitSettlementWaits 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 aDispositionback.- Parameters:
- timeout- the maximum time to wait for the remote to settle.
- unit- the time unit of the timeout argument.
- Returns:
- this Trackerinstance.
- Throws:
- ClientException- if an error occurs while awaiting the remote settlement.
 
- 
awaitAcceptedWaits if necessary for the remote to settle the sent delivery with anAccepteddisposition unless it has either already been settled and accepted or the original delivery was sent settled in which case the remote will not send aDispositionback.- Returns:
- this Trackerinstance.
- Throws:
- ClientDeliveryStateException- if the remote sends a disposition other than Accepted.
- ClientException- if an error occurs while awaiting the remote settlement.
 
- 
awaitAcceptedWaits if necessary for the remote to settle the sent delivery with anAccepteddisposition unless it has either already been settled and accepted or the original delivery was sent settled in which case the remote will not send aDispositionback.- Parameters:
- timeout- the maximum time to wait for the remote to settle.
- unit- the time unit of the timeout argument.
- Returns:
- this Trackerinstance.
- Throws:
- ClientDeliveryStateException- if the remote sends a disposition other than Accepted.
- ClientException- if an error occurs while awaiting the remote settlement.
 
 
-