Class KeylockProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.keylock.KeylockProperties
All Implemented Interfaces:
JposBaseInterface, KeylockInterface
Direct Known Subclasses:
Keylock

public class KeylockProperties extends JposCommonProperties implements KeylockInterface
Class containing the keylock specific properties, their default values and default implementations of KeylockInterface. For details about properties, methods and method parameters, see UPOS specification, chapter Keylock.
  • Field Details

    • CapKeylockType

      public int CapKeylockType
      UPOS property CapKeylockType. Default: KT_STANDARD. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • ElectronicKeyValueDef

      public byte[] ElectronicKeyValueDef
      Default value of ElectronicKeyValue property. Default: Zero-length byte array. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • KeyPositionDef

      public int KeyPositionDef
      Default value of KeyPosition property. Default: KP_ANY. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • PositionCount

      public int PositionCount
      UPOS property PositionCount. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • KeyPosition

      public int KeyPosition
      UPOS property KeyPosition.
    • ElectronicKeyValue

      public byte[] ElectronicKeyValue
      UPOS property ElectronicKeyValue.
  • Constructor Details

    • KeylockProperties

      public KeylockProperties(int dev)
      Constructor. Sets ExclusiveUse to ExclusiveNo to match the Keylock device model.
      Parameters:
      dev - Device index
  • Method Details

    • initOnOpen

      public void initOnOpen()
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during open.
      Overrides:
      initOnOpen in class JposCommonProperties
    • initOnEnable

      public void initOnEnable(boolean enable)
      Description copied from class: JposCommonProperties
      Initialization of properties that must be initialized during deviceEnable.
      Overrides:
      initOnEnable in class JposCommonProperties
      Parameters:
      enable - True: initialize properties, false: do nothing
    • waitForKeylockChange

      public void waitForKeylockChange(int keyPosition, int timeout) throws jpos.JposException
      Description copied from interface: KeylockInterface
      Final part of WaitForKeylockChange 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,
      • keyPosition is between 0 and PositionCount,
      • timeout is ≥ 0 or JPOS_FOREVER.
      Specified by:
      waitForKeylockChange in interface KeylockInterface
      Parameters:
      keyPosition - Requested keylock position.
      timeout - Maximum number of milliseconds to wait for the keylock before returning control back to the application.
      Throws:
      jpos.JposException - If an error occurs.