Class ClientNoOpStreamTracker
- java.lang.Object
-
- org.apache.qpid.protonj2.client.impl.ClientNoOpTracker
-
- org.apache.qpid.protonj2.client.impl.ClientNoOpStreamTracker
-
- All Implemented Interfaces:
StreamTracker
,Tracker
public class ClientNoOpStreamTracker extends ClientNoOpTracker implements StreamTracker
A dummy Tracker instance that always indicates remote settlement and acceptance forStreamSender
instances.
-
-
Method Summary
All Methods Instance Methods Concrete 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
.-
Methods inherited from class org.apache.qpid.protonj2.client.impl.ClientNoOpTracker
awaitAccepted, awaitAccepted, remoteSettled, remoteState, settled, settlementFuture, state
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.protonj2.client.StreamTracker
settlementFuture
-
Methods inherited from interface org.apache.qpid.protonj2.client.Tracker
awaitAccepted, awaitAccepted, remoteSettled, remoteState, settled, state
-
-
-
-
Method Detail
-
sender
public StreamSender sender()
Description copied from interface:StreamTracker
- Specified by:
sender
in interfaceStreamTracker
- Specified by:
sender
in interfaceTracker
- Overrides:
sender
in classClientNoOpTracker
- Returns:
- the
Sender
that was used to send the delivery that is being tracked.
-
settle
public StreamTracker settle() throws ClientException
Description copied from interface:Tracker
Settles the delivery locally, if notauto-settling
.- Specified by:
settle
in interfaceStreamTracker
- Specified by:
settle
in interfaceTracker
- Overrides:
settle
in classClientNoOpTracker
- Returns:
- this
Tracker
instance. - Throws:
ClientException
- if an error occurs while performing the settlement.
-
disposition
public StreamTracker disposition(DeliveryState state, boolean settle) throws ClientException
Description copied from interface:Tracker
Updates the DeliveryState, and optionally settle the delivery as well.- Specified by:
disposition
in interfaceStreamTracker
- Specified by:
disposition
in interfaceTracker
- Overrides:
disposition
in classClientNoOpTracker
- Parameters:
state
- the delivery state to applysettle
- whether toTracker.settle()
the delivery at the same time- Returns:
- this
Tracker
instance. - Throws:
ClientException
- if an error occurs while applying the given disposition
-
awaitSettlement
public StreamTracker awaitSettlement() 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 aDisposition
back.- Specified by:
awaitSettlement
in interfaceStreamTracker
- Specified by:
awaitSettlement
in interfaceTracker
- Overrides:
awaitSettlement
in classClientNoOpTracker
- Returns:
- this
Tracker
instance. - Throws:
ClientException
- if an error occurs while awaiting the remote settlement.
-
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 aDisposition
back.- Specified by:
awaitSettlement
in interfaceStreamTracker
- Specified by:
awaitSettlement
in interfaceTracker
- Overrides:
awaitSettlement
in classClientNoOpTracker
- 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.
-
-