public interface PcscReader
extends org.eclipse.keyple.core.service.event.ObservableReader
ObservableReader) and allowing to set the operating parameters of a
reader based on a PC/SC hardware interface (USB CCID).| Modifier and Type | Interface and Description |
|---|---|
static class |
PcscReader.DisconnectionMode
Actions to be taken after disconnection of the card.
|
static class |
PcscReader.IsoProtocol
Available transmission protocols as defined in the PC/SC standard.
|
static class |
PcscReader.SharingMode
Defines the expected behavior regarding the access to the card in a
multithreaded/multi-application context.
|
org.eclipse.keyple.core.service.event.ObservableReader.NotificationMode, org.eclipse.keyple.core.service.event.ObservableReader.PollingMode, org.eclipse.keyple.core.service.event.ObservableReader.ReaderObserver| Modifier and Type | Method and Description |
|---|---|
PcscReader |
setContactless(boolean contactless)
Sets the reader transmission mode.
|
PcscReader |
setDisconnectionMode(PcscReader.DisconnectionMode disconnectionMode)
Changes the action to be taken after disconnection (default value
PcscReader.DisconnectionMode.LEAVE). |
PcscReader |
setIsoProtocol(PcscReader.IsoProtocol isoProtocol)
Changes the protocol to be used by the PC/SC reader when connecting to the card (
PcscReader.IsoProtocol.T0, PcscReader.IsoProtocol.T1, or PcscReader.IsoProtocol.TCL), or PcscReader.IsoProtocol.ANY to connect using any available protocol (default value PcscReader.IsoProtocol.ANY). |
PcscReader |
setSharingMode(PcscReader.SharingMode sharingMode)
Changes the PC/SC sharing mode (default value
PcscReader.SharingMode.EXCLUSIVE). |
PcscReader setSharingMode(PcscReader.SharingMode sharingMode)
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.
sharingMode - The PcscReader.SharingMode to use (must be not null).java.lang.IllegalArgumentException - if sharingMode is nullPcscReader setContactless(boolean contactless)
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 duty of the application to give the reader the means to know his own type.
This information will be used by the Reader.isContactless() mode method.
This can be achieved with this method but also by giving the plugin the means to determine the
type from the reader's name. In the latter case, the application does not need to call this
method, the reader itself will determine its type using the plugin's parameters (see PcscPlugin.setReaderNameFilter(boolean, String).
The default value for this parameter if this method is not called is undefined.
The Reader.isContactless() may raise an IllegalStateException.
contactless - True to set contactless mode, false to set contact mode.PcscReader setIsoProtocol(PcscReader.IsoProtocol isoProtocol)
PcscReader.IsoProtocol.T0, PcscReader.IsoProtocol.T1, or PcscReader.IsoProtocol.TCL), or PcscReader.IsoProtocol.ANY to connect using any available protocol (default value PcscReader.IsoProtocol.ANY).isoProtocol - The PcscReader.IsoProtocol to use (must be not null).java.lang.IllegalArgumentException - if isoProtocol is nullPcscReader setDisconnectionMode(PcscReader.DisconnectionMode disconnectionMode)
PcscReader.DisconnectionMode.LEAVE).
The cardis either reset or left as is.
The default value for this parameter if this method is not called is PcscReader.DisconnectionMode.LEAVE.
disconnectionMode - The PcscReader.DisconnectionMode to use (must be not null).java.lang.IllegalArgumentException - if disconnectionMode is null