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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void activateProtocol​(java.lang.String physicalProtocolName, java.lang.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​(java.lang.String physicalProtocolName)
      Deactivates the provided reader communication protocol.
      java.lang.String getCurrentProtocol()
      Returns the name of the physical protocol currently used by the reader.
    • Method Detail

      • activateProtocol

        void activateProtocol​(java.lang.String physicalProtocolName,
                              java.lang.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 Terminal 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:
        java.lang.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​(java.lang.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:
        java.lang.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

        java.lang.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:
        activateProtocol(String, String)