Interface PcscReader

  • All Superinterfaces:
    org.eclipse.keyple.core.common.KeypleReaderExtension

    public interface PcscReader
    extends org.eclipse.keyple.core.common.KeypleReaderExtension
    PC/SC specific KeypleReaderExtension.

    Provides specific settings and methods for configuring a PC/SC reader.

    Since:
    2.0.0
    • Method Detail

      • setSharingMode

        PcscReader setSharingMode​(PcscReader.SharingMode sharingMode)
        Changes the PC/SC sharing mode (default value PcscReader.SharingMode.EXCLUSIVE).

        This mode will be used when a new Card is created.

        If a card is already inserted, changes immediately the mode in the current Card object.

        Parameters:
        sharingMode - The PcscReader.SharingMode to use (must be not null).
        Returns:
        This instance.
        Throws:
        java.lang.IllegalArgumentException - If sharingMode is null
        java.lang.IllegalStateException - If the sharing mode setting failed.
        Since:
        2.0.0
      • setContactless

        PcscReader setContactless​(boolean contactless)
        Sets the reader transmission mode.

        A PC/SC reader can be contact or contactless. There is no way by generic programming to know what type of technology a reader uses.

        Thus, it is the responsibility of the application to give the reader the means to know his own type.

        This can be done in two ways:

        • by invoking this method,
        • by giving the plugin the means to determine the type from the name of the reader. In the latter case, the application does not need to call this method, the reader will determine its type itself using the plugin parameters (see PcscPluginFactoryBuilder.

        There is no default mode, so it is mandatory to set the mode by any of the above methods.

        Parameters:
        contactless - true to set contactless mode, false to set contact mode.
        Returns:
        This instance.
        Since:
        2.0.0