Interface ConfigurableCardReader

All Superinterfaces:
CardReader

public interface ConfigurableCardReader extends CardReader
Configurable card reader providing the methods to manage the card protocols.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activateProtocol(String physicalProtocolName, String logicalProtocolName)
    Activates the reader communication protocol by associating the provided physical communication protocol name and the logical communication protocol name defined by the application.
    void
    deactivateProtocol(String physicalProtocolName)
    Deactivates the provided reader communication protocol.
    Returns the name of the physical protocol currently used by the reader.

    Methods inherited from interface org.eclipse.keypop.reader.CardReader

    getName, isCardPresent, isContactless
  • Method Details

    • activateProtocol

      void activateProtocol(String physicalProtocolName, String logicalProtocolName)
      Activates the reader communication protocol by associating the provided physical communication protocol name and the logical communication protocol name defined by the application.
      • Activates the detection of cards using the provided reader communication protocol.
      • Internally associates the two strings provided as arguments.

      The association between the communication protocol name known by the reader and the communication protocol name defined by the application is intended to manage non-ISO cards. It allows a unique protocol name to be set when constructing a card selector as defined by the Keypop Card API regardless of the type of reader that will be used.

      Parameters:
      physicalProtocolName - The name of the physical communication protocol as known by the reader. See the reader documentation for the list of supported communication protocols.
      logicalProtocolName - The name of the logical protocol associated with the cards detected with the physical protocol also provided. This name can be used by the application to perform filtering at the time of selection.
      Throws:
      IllegalArgumentException - If one of the provided communication protocols is null or empty.
      ReaderProtocolNotSupportedException - If the reader communication protocol is not supported.
      Since:
      1.0.0
    • deactivateProtocol

      void deactivateProtocol(String physicalProtocolName)
      Deactivates the provided reader communication protocol. Inhibits the detection of cards using this reader communication protocol.
      Parameters:
      physicalProtocolName - The name of the physical communication protocol as known by the reader. See the reader documentation for the list of supported communication protocols.
      Throws:
      IllegalArgumentException - If the provided reader communication protocol is null or empty.
      ReaderProtocolNotSupportedException - If the reader communication protocol is not supported.
      Since:
      1.0.0
    • getCurrentProtocol

      String getCurrentProtocol()
      Returns the name of the physical protocol currently used by the reader.
      Returns:
      Null if no selection has been made yet or if no protocol has been activated.
      Since:
      1.2.0
      See Also: