Class VendingReadyRequest
java.lang.Object
at.hobex.helper.VendingReadyRequest
Represents the readiness state and configuration for vending machine goods allocation
in a ZVT transaction flow.
This class stores:
- Whether goods are ready to be dispensed
- Whether the readiness state has changed
- The maximum number of retries allowed for allocation
- The current partial amount of the transaction
- Author:
- Alexander Vavrik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the maximum number of retry attempts allowed for goods allocation.booleanIndicates if the readiness state has been changed since it was last set.booleanisReady()Returns whether the vending order is currently ready.voidsetCount(int countOfMaxRetry) Sets the maximum number of retry attempts for goods allocation.voidsetReady(boolean ready) Sets the readiness state of the vending order.
-
Constructor Details
-
VendingReadyRequest
public VendingReadyRequest()
-
-
Method Details
-
setReady
public void setReady(boolean ready) Sets the readiness state of the vending order.This marks the state as changed and logs the update. A
truevalue signals that goods are ready for allocation, whilefalseindicates that goods cannot currently be dispensed.- Parameters:
ready-trueif goods are ready to be dispensed,falseotherwise
-
isReady
public boolean isReady()Returns whether the vending order is currently ready.- Returns:
trueif goods are ready to be dispensed,falseotherwise
-
getStateChanged
public boolean getStateChanged()Indicates if the readiness state has been changed since it was last set.This flag can be used to trigger communication with the ZVT terminal only when a state change occurs.
- Returns:
trueif the readiness state has changed,falseotherwise
-
setCount
public void setCount(int countOfMaxRetry) Sets the maximum number of retry attempts for goods allocation.Logs the change for diagnostics.
- Parameters:
countOfMaxRetry- maximum number of retries allowed
-
getCountOfMaxRetry
Gets the maximum number of retry attempts allowed for goods allocation.- Returns:
- the maximum retry count
-