Interface CashDrawerInterface

All Superinterfaces:
JposBaseInterface
All Known Implementing Classes:
CashDrawer, CashDrawerProperties

public interface CashDrawerInterface extends JposBaseInterface
Interface for methods that implement property setter and method calls for the CashDrawer device category. For details about properties, methods and method parameters, see UPOS specification, chapter Cash Drawer. Further details about error handling can be found in introduction - Device Behavior Models - Errors.
  • Method Details

    • openDrawer

      void openDrawer() throws jpos.JposException
      Final part of OpenDrawer method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Device has not been claimed by other instance.
      Throws:
      jpos.JposException - If an error occurs.
    • waitForDrawerClose

      void waitForDrawerClose() throws jpos.JposException
      Final part of WaitForDrawerClose method. Can be overwritten in derived class, if necessary. Since the CashDrawerService class performs beeping directly via the underlaying standardized sound system via javax.sound, the parameters beepTimeout, beepDuration, beepFrequency and beepDelay will not be forwarded to the final part.
      This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapStatus is true,
      • The parameters beepTimeout, beepDuration and beepDelay of the calling method are positive or FOREVER,
      • The parameter beepFrequency is between 10 and 24000.
      since the parameters beepTimeout, beepFrequency, beepDuration and beepDelay will not be passed to this method because sound generation will be performed via the sound system, it must simply wait the drawer state changes to closed and return immediately after that change.
      Keep also in mind that the beep duration should be at least 1/8 seconds (125 milliseconds) to ensure that it can be heard, values above 1/4 second (250 milliseconds) are recommended.
      Throws:
      jpos.JposException - If an error occurs.