Interface ConfigurableReaderSpi
- All Superinterfaces:
ReaderSpi
Reader able to manage multiple protocols and which allows the configuration of the protocol to
use.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activateProtocol
(String readerProtocol) Activates a specific protocol in order to make the reader able to communicate with the cards using this protocol.void
deactivateProtocol
(String readerProtocol) Deactivates a specific protocol so that the reader ignores cards using this protocol.boolean
isCurrentProtocol
(String readerProtocol) Tells if the current card communicates with the provided protocol.boolean
isProtocolSupported
(String readerProtocol) Indicates if the provided reader protocol is supported by the reader.Methods inherited from interface org.eclipse.keyple.core.plugin.spi.reader.ReaderSpi
checkCardPresence, closePhysicalChannel, getName, getPowerOnData, isContactless, isPhysicalChannelOpen, onUnregister, openPhysicalChannel, transmitApdu
-
Method Details
-
isProtocolSupported
Indicates if the provided reader protocol is supported by the reader.Using this method allows to invoke the
activateProtocol(String)
method only if the protocol is supported.- Parameters:
readerProtocol
- The reader protocol.- Returns:
- True if the protocol is supported, false if not.
- Since:
- 2.0.0
-
activateProtocol
Activates a specific protocol in order to make the reader able to communicate with the cards using this protocol.- Parameters:
readerProtocol
- The reader specific protocol to activate.- Since:
- 2.0.0
-
deactivateProtocol
Deactivates a specific protocol so that the reader ignores cards using this protocol.- Parameters:
readerProtocol
- The reader specific protocol to deactivate.- Since:
- 2.0.0
-
isCurrentProtocol
Tells if the current card communicates with the provided protocol.- Parameters:
readerProtocol
- The reader protocol to check.- Returns:
- True if the current protocol corresponds to the one provided, false if not.
- Since:
- 2.0.0
-