Class VendingReadyRequest

java.lang.Object
at.hobex.helper.VendingReadyRequest

public class VendingReadyRequest extends Object
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
It is used in vending scenarios where the ZVT terminal waits for a readiness signal before completing the purchase. All state changes are logged for diagnostic purposes.

Author:
Alexander Vavrik
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the maximum number of retry attempts allowed for goods allocation.
    boolean
    Indicates if the readiness state has been changed since it was last set.
    boolean
    Returns whether the vending order is currently ready.
    void
    setCount(int countOfMaxRetry)
    Sets the maximum number of retry attempts for goods allocation.
    void
    setReady(boolean ready)
    Sets the readiness state of the vending order.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 true value signals that goods are ready for allocation, while false indicates that goods cannot currently be dispensed.

      Parameters:
      ready - true if goods are ready to be dispensed, false otherwise
    • isReady

      public boolean isReady()
      Returns whether the vending order is currently ready.
      Returns:
      true if goods are ready to be dispensed, false otherwise
    • 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:
      true if the readiness state has changed, false otherwise
    • 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

      public Integer getCountOfMaxRetry()
      Gets the maximum number of retry attempts allowed for goods allocation.
      Returns:
      the maximum retry count