public final class ReaderEvent
extends java.lang.Object
ObservableReader.
The various events that can occur concern the insertion and removal of a card from a reader.
When an insertion is made there are two cases depending on whether a default selection has been programmed or not.
| Modifier and Type | Class and Description |
|---|---|
static class |
ReaderEvent.EventType
The different types of reader events, reflecting the status of the reader regarding the
presence of a card.
|
| Constructor and Description |
|---|
ReaderEvent(java.lang.String pluginName,
java.lang.String readerName,
ReaderEvent.EventType eventType,
AbstractDefaultSelectionsResponse defaultSelectionsResponse)
ReaderEvent constructor for simple insertion notification mode
|
| Modifier and Type | Method and Description |
|---|---|
AbstractDefaultSelectionsResponse |
getDefaultSelectionsResponse()
Gets the default selection response that may be present when the event is
ReaderEvent.EventType.CARD_INSERTED, always present when the event is ReaderEvent.EventType.CARD_MATCHED and
null in the others cases. |
ReaderEvent.EventType |
getEventType()
Gets the reader event type.
|
Plugin |
getPlugin()
Gets the
Plugin from which the reader that generated the event comes from. |
java.lang.String |
getPluginName()
Gets the name of the plugin from which the reader that generated the event comes from
|
Reader |
getReader()
Gets the
Reader from which generated event comes from |
java.lang.String |
getReaderName()
Gets the name of the reader that generated the event comes from
|
public ReaderEvent(java.lang.String pluginName,
java.lang.String readerName,
ReaderEvent.EventType eventType,
AbstractDefaultSelectionsResponse defaultSelectionsResponse)
pluginName - the name of the current plugin (should be not null)readerName - the name of the current reader (should be not null)eventType - the type of event (should be not null)defaultSelectionsResponse - the response to the default AbstractDefaultSelectionsRequest
(may be null)public java.lang.String getPluginName()
public java.lang.String getReaderName()
public ReaderEvent.EventType getEventType()
public AbstractDefaultSelectionsResponse getDefaultSelectionsResponse()
ReaderEvent.EventType.CARD_INSERTED, always present when the event is ReaderEvent.EventType.CARD_MATCHED and
null in the others cases.public Plugin getPlugin()
Plugin from which the reader that generated the event comes from.