Package org.apache.qpid.protonj2.client
Interface StreamTracker
-
- All Superinterfaces:
Tracker
- All Known Implementing Classes:
ClientNoOpStreamTracker,ClientStreamTracker
public interface StreamTracker extends Tracker
Special StreamSender relatedTrackerthat is linked to anyStreamSenderMessageinstance and provides theTrackerfunctions for those types of messages.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StreamTrackerawaitSettlement()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.StreamTrackerawaitSettlement(long timeout, java.util.concurrent.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.StreamTrackerdisposition(DeliveryState state, boolean settle)Updates the DeliveryState, and optionally settle the delivery as well.StreamSendersender()StreamTrackersettle()Settles the delivery locally, if notauto-settling.java.util.concurrent.Future<Tracker>settlementFuture()Returns a future that can be used to wait for the remote to acknowledge receipt of a sent message by settling it.-
Methods inherited from interface org.apache.qpid.protonj2.client.Tracker
awaitAccepted, awaitAccepted, remoteSettled, remoteState, settled, state
-
-
-
-
Method Detail
-
sender
StreamSender sender()
- Specified by:
senderin interfaceTracker- Returns:
- the
StreamSenderthat is associated with thisStreamTracker.
-
settle
StreamTracker settle() throws ClientException
Settles the delivery locally, if notauto-settling.- Specified by:
settlein interfaceTracker- Returns:
- this
StreamTrackerinstance. - Throws:
ClientException- if an error occurs while performing the settlement.
-
settlementFuture
java.util.concurrent.Future<Tracker> settlementFuture()
Returns a future that can be used to wait for the remote to acknowledge receipt of a sent message by settling it.- Specified by:
settlementFuturein interfaceTracker- Returns:
- a
Futurethat can be used to wait on remote settlement.
-
disposition
StreamTracker disposition(DeliveryState state, boolean settle) throws ClientException
Updates the DeliveryState, and optionally settle the delivery as well.- Specified by:
dispositionin interfaceTracker- Parameters:
state- the delivery state to applysettle- whether toTracker.settle()the delivery at the same time- Returns:
- this
StreamTrackerinstance. - Throws:
ClientException- if an error occurs while applying the given disposition
-
awaitSettlement
StreamTracker awaitSettlement() throws ClientException
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.- Specified by:
awaitSettlementin interfaceTracker- Returns:
- this
StreamTrackerinstance. - Throws:
ClientException- if an error occurs while awaiting the remote settlement.
-
awaitSettlement
StreamTracker awaitSettlement(long timeout, java.util.concurrent.TimeUnit unit) throws ClientException
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.- Specified by:
awaitSettlementin interfaceTracker- Parameters:
timeout- the maximum time to wait for the remote to settle.unit- the time unit of the timeout argument.- Returns:
- this
StreamTrackerinstance. - Throws:
ClientException- if an error occurs while awaiting the remote settlement.
-
-