Class SCRWDevice

All Implemented Interfaces:
Runnable

public class SCRWDevice extends JposDevice implements Runnable
JposDevice based dummy implementation for JavaPOS SmartCardRW device service implementation. No real hardware. All read data with dummy values, operator interaction via OptionDialog boxes.
Supported configuration values for SmartCardRW in jpos.xml can be used to set the corresponding property values:
  • CapCardErrorDetection: Can be TRUE or FALSE. Default is FALSE.
  • CapInterfaceMode: Can be set to "SC_CMODE_TRANS", "SC_CMODE_BLOCK", "SC_CMODE_APDU" or "SC_CMODE_XML".
  • CapIsoEmvMode: Can be set to "SC_CMODE_ISO" or "SC_CMODE_EMV".
  • CapSCPresentSensor: Can be set to any hexadecimal value between 0 and FFFFFFFF.
  • CapSCSlots: Can be set to any hexadecimal value between 0 and FFFFFFFF.
  • TransmissionProtocol: Can be set to "SC_CTRANS_PROTOCOL_T0" or "SC_CTRANS_PROTOCOL_T1".
In addition, the following values in jpos.xml can be used to setup specific behavior:
  • CardReadyDelay: Maximum time between card insertion and card being ready. Default: 1000 (one second),
  • Constructor Details

    • SCRWDevice

      protected SCRWDevice(String id)
      The device implementation. See parent for further details.
      Parameters:
      id - Device ID, not used by implementation.
  • Method Details

    • checkProperties

      public void checkProperties(jpos.config.JposEntry entry) throws jpos.JposException
      Description copied from class: JposBaseDevice
      Checks whether a JposEntry belongs to a predefined property value an if so, sets the corresponding driver value
      Overrides:
      checkProperties in class JposBaseDevice
      Parameters:
      entry - Entry to be checked, contains value to be set
      Throws:
      jpos.JposException - if a property value is invalid
    • changeDefaults

      public void changeDefaults(SmartCardRWProperties props)
      Description copied from class: JposDevice
      Change defaults of properties. Must be implemented within derived classed that support smart card reader / writer services.
      Overrides:
      changeDefaults in class JposDevice
      Parameters:
      props - Property set for setting the property defaults
    • getSmartCardRWProperties

      public SmartCardRWProperties getSmartCardRWProperties(int index)
      Description copied from class: JposDevice
      Returns device implementation of SmartCardRWProperties.
      Overrides:
      getSmartCardRWProperties in class JposDevice
      Parameters:
      index - Device index, see constructor of JposCommonProperties.
      Returns:
      Instance of SmartCardRWProperties that matches the requirements of the corresponding device service.
    • run

      public void run()
      Specified by:
      run in interface Runnable