Class AbCircleCardTerminalBluetooth

java.lang.Object
javax.smartcardio.CardTerminal
com.abc.bluetoothTerminalfactory.AbCircleCardTerminalBluetooth

public class AbCircleCardTerminalBluetooth extends CardTerminal
The AbCircleCardTerminalBluetooth class represents an AB Circle Bluetooth card terminal, which is an extension of the javax SmartcardIO Card Terminal.
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in class CardTerminal
    • connect

      public Card connect(String protocol) throws CardException
      Specified by:
      connect in class CardTerminal
      Throws:
      CardException
    • isCardPresent

      public boolean isCardPresent()
      Specified by:
      isCardPresent in class CardTerminal
    • waitForCardPresent

      public boolean waitForCardPresent(long timeout)
      Specified by:
      waitForCardPresent in class CardTerminal
    • waitForCardAbsent

      public boolean waitForCardAbsent(long timeout)
      Specified by:
      waitForCardAbsent in class CardTerminal
    • disconnect

      public void disconnect()
      Disconnects the card terminal
    • getBatteryLevel

      public int getBatteryLevel() throws IllegalAccessError
      Gets the battery level from the reader as percentage (0xFF if charging)
      Returns:
      integer representing the battery level
      Throws:
      IllegalAccessError
    • getBatteryLevel

      public int getBatteryLevel(int option) throws IllegalAccessError
      Gets the battery level from the reader as percentage (0xFF if charging) or the voltage value in mV
      Parameters:
      option - 1 to get percentage, 2 to get voltage value (in mV)
      Returns:
      Depending the option, an integer representing the level percentage or the voltage
      Throws:
      IllegalAccessError
    • getFirmwareVersion

      public String getFirmwareVersion() throws IllegalAccessError
      Returns the firmware version of the terminal as ASCII string
      Returns:
      firmware version in Ascii
      Throws:
      IllegalAccessError
    • getSerialNumber

      public String getSerialNumber() throws IllegalAccessError
      Returns the serial number of the terminal as ASCII string
      Returns:
      firmware version in Ascii
      Throws:
      IllegalAccessError
    • isACKProtocolEnabled

      public boolean isACKProtocolEnabled() throws IllegalAccessError
      Indicates if the ACK protocol is enabled on the terminal
      Returns:
      true if enabled, else false
      Throws:
      IllegalAccessError
    • toString

      public String toString()
      Returns the terminal representation
      Overrides:
      toString in class Object
      Returns:
      String