Interface StubReader

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

    public interface StubReader
    extends org.eclipse.keyple.core.common.KeypleReaderExtension
    The Stub Reader supports programmatically the insertion and removal of StubSmartCard
    To invoke those methods use Reader#getExtension(StubReader.class) from the Reader class.
    Since:
    2.0.0
    • Method Detail

      • insertCard

        void insertCard​(StubSmartCard smartCard)
        Insert a stub card into the reader. The card is taken into account by the reader only if its protocol has been activated previously by the method ConfigurableReaderSpi.activateProtocol(String) In such case it raises a CARD_INSERTED event.
        Parameters:
        smartCard - stub card to be inserted in the reader (not nullable)
        Since:
        2.0.0
      • removeCard

        void removeCard()
        Remove card from reader if any
        Since:
        2.0.0
      • getSmartcard

        StubSmartCard getSmartcard()
        Get inserted card
        Returns:
        instance of a StubSmartCard, can be null if no card inserted
        Since:
        2.0.0