Class ClientNoOpTracker
java.lang.Object
org.apache.qpid.protonj2.client.impl.ClientNoOpTracker
- All Implemented Interfaces:
Tracker
A dummy Tracker instance that always indicates remote settlement and
acceptance.
-
Method Summary
Modifier and TypeMethodDescriptionWaits if necessary for the remote to settle the sent delivery with anAccepted
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 aDisposition
back.awaitAccepted
(long timeout, TimeUnit unit) Waits if necessary for the remote to settle the sent delivery with anAccepted
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 aDisposition
back.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.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 aDisposition
back.disposition
(DeliveryState state, boolean settle) Updates the DeliveryState, and optionally settle the delivery as well.boolean
Gets 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
.boolean
settled()
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
-
sender
-
settle
Description copied from interface:Tracker
Settles the delivery locally, if notauto-settling
.- Specified by:
settle
in interfaceTracker
- Returns:
- this
Tracker
instance. - Throws:
ClientException
- if an error occurs while performing the settlement.
-
settled
public boolean settled() -
state
Description copied from interface:Tracker
Gets the current local state for the tracked delivery. -
disposition
Description copied from interface:Tracker
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
Tracker
instance. - Throws:
ClientException
- if an error occurs while applying the given disposition
-
remoteState
Description copied from interface:Tracker
Gets the current remote state for the tracked delivery.- Specified by:
remoteState
in interfaceTracker
- 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 interfaceTracker
- Returns:
- whether the delivery is remotely settled
-
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 interfaceTracker
- Returns:
- a
Future
that can be used to wait on remote settlement.
-
awaitSettlement
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 interfaceTracker
- Returns:
- this
Tracker
instance. - Throws:
ClientException
- if an error occurs while awaiting the remote settlement.
-
awaitSettlement
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 interfaceTracker
- 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.
-
awaitAccepted
Description copied from interface:Tracker
Waits if necessary for the remote to settle the sent delivery with anAccepted
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 aDisposition
back.- Specified by:
awaitAccepted
in interfaceTracker
- Returns:
- this
Tracker
instance. - Throws:
ClientException
- if an error occurs while awaiting the remote settlement.
-
awaitAccepted
Description copied from interface:Tracker
Waits if necessary for the remote to settle the sent delivery with anAccepted
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 aDisposition
back.- Specified by:
awaitAccepted
in interfaceTracker
- 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.
-