public interface PcscPlugin
extends org.eclipse.keyple.core.service.event.ObservablePlugin
PcscPluginFactory and allow
to set parameters to retrieve the communication mode from the name of a reader.| Modifier and Type | Method and Description |
|---|---|
void |
setProtocolIdentificationRule(java.lang.String readerProtocolName,
java.lang.String protocolRule)
Sets a protocol identification rule based on an ATR analysis.
|
void |
setReaderNameFilter(boolean contactlessMode,
java.lang.String readerNameFilter)
Sets a filter based on regular expressions to make the plugin able to identify the
communication mode of a card reader from its name.
|
void setReaderNameFilter(boolean contactlessMode,
java.lang.String readerNameFilter)
For example, the string ".*less.*" could identify all readers having "less" in their name as contactless readers.
Names are not always as explicit, so it is sometimes better to test the brand and model.
Commonly used contactless readers include the "ASK LoGO" and "ACS ACR 122" models, while
contact readers include "Cherry TC" or "Identive".
Thus, an application using these readers could call this method a first time with true
and ".*(ASK LoGO|ACS ACR122).*" and a second time with false and
".*(Cherry TC|Identive).*".
Note: The use of this method is optional if the transmission mode of the readers is set
directly at the reader level with the PcscReader.setContactless(boolean) method.
Otherwise this method must imperatively be called twice to set the identification filters for
both transmission modes.
contactlessMode - True if the the filter is to be associated with contactless readers,
false if not.readerNameFilter - A string a regular expression (must be not empty).void setProtocolIdentificationRule(java.lang.String readerProtocolName,
java.lang.String protocolRule)
The rule is a regular expression contained in a String.
PcscProtocolSetting), however, depending on the type of reader used the ATR returned when
presenting contactless cards may vary. It is therefore important to be able to update these
rules.readerProtocolName - A not empty String.protocolRule - A not empty String.