Package org.apache.qpid.protonj2.client
Interface StreamTracker
-
- All Superinterfaces:
Tracker
- All Known Implementing Classes:
ClientNoOpStreamTracker
,ClientStreamTracker
public interface StreamTracker extends Tracker
Special StreamSender relatedTracker
that is linked to anyStreamSenderMessage
instance and provides theTracker
functions for those types of messages.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StreamTracker
awaitSettlement()
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 aDisposition
back.StreamTracker
awaitSettlement(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 aDisposition
back.StreamTracker
disposition(DeliveryState state, boolean settle)
Updates the DeliveryState, and optionally settle the delivery as well.StreamSender
sender()
StreamTracker
settle()
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:
sender
in interfaceTracker
- Returns:
- the
StreamSender
that is associated with thisStreamTracker
.
-
settle
StreamTracker settle() throws ClientException
Settles the delivery locally, if notauto-settling
.- Specified by:
settle
in interfaceTracker
- Returns:
- this
StreamTracker
instance. - 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:
settlementFuture
in interfaceTracker
- Returns:
- a
Future
that 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:
disposition
in interfaceTracker
- Parameters:
state
- the delivery state to applysettle
- whether toTracker.settle()
the delivery at the same time- Returns:
- this
StreamTracker
instance. - 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 aDisposition
back.- Specified by:
awaitSettlement
in interfaceTracker
- Returns:
- this
StreamTracker
instance. - 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 aDisposition
back.- Specified by:
awaitSettlement
in interfaceTracker
- Parameters:
timeout
- the maximum time to wait for the remote to settle.unit
- the time unit of the timeout argument.- Returns:
- this
StreamTracker
instance. - Throws:
ClientException
- if an error occurs while awaiting the remote settlement.
-
-