Package com.abc.bluetoothTerminalfactory
Class AbCircleCardTerminalBluetooth
java.lang.Object
javax.smartcardio.CardTerminal
com.abc.bluetoothTerminalfactory.AbCircleCardTerminalBluetooth
The
AbCircleCardTerminalBluetooth class represents an AB Circle Bluetooth card terminal,
which is an extension of the javax SmartcardIO Card Terminal.-
Method Summary
Modifier and TypeMethodDescriptionvoidDisconnects the card terminalintGets the battery level from the reader as percentage (0xFF if charging)intgetBatteryLevel(int option) Gets the battery level from the reader as percentage (0xFF if charging) or the voltage value in mVReturns the firmware version of the terminal as ASCII stringgetName()Returns the serial number of the terminal as ASCII stringbooleanIndicates if the ACK protocol is enabled on the terminalbooleantoString()Returns the terminal representationbooleanwaitForCardAbsent(long timeout) booleanwaitForCardPresent(long timeout)
-
Method Details
-
getName
- Specified by:
getNamein classCardTerminal
-
connect
- Specified by:
connectin classCardTerminal- Throws:
CardException
-
isCardPresent
public boolean isCardPresent()- Specified by:
isCardPresentin classCardTerminal
-
waitForCardPresent
public boolean waitForCardPresent(long timeout) - Specified by:
waitForCardPresentin classCardTerminal
-
waitForCardAbsent
public boolean waitForCardAbsent(long timeout) - Specified by:
waitForCardAbsentin classCardTerminal
-
disconnect
public void disconnect()Disconnects the card terminal -
getBatteryLevel
Gets the battery level from the reader as percentage (0xFF if charging)- Returns:
- integer representing the battery level
- Throws:
IllegalAccessError
-
getBatteryLevel
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
Returns the firmware version of the terminal as ASCII string- Returns:
- firmware version in Ascii
- Throws:
IllegalAccessError
-
getSerialNumber
Returns the serial number of the terminal as ASCII string- Returns:
- firmware version in Ascii
- Throws:
IllegalAccessError
-
isACKProtocolEnabled
Indicates if the ACK protocol is enabled on the terminal- Returns:
- true if enabled, else false
- Throws:
IllegalAccessError
-
toString
Returns the terminal representation
-