public final class CardDetector
extends java.lang.Object
detector of available ehealth card
Modifier and Type | Method and Description |
---|---|
static CardDetector |
getInstance()
Get the singleton instance
|
void |
handleCardAbsentEvents(de.gematik.ti.cardreader.provider.api.events.card.CardAbsentEvent cardAbsentEvent)
Handle the card absent events and inform event bus subscriber about absent health card if card before known as health card
|
void |
handleCardPresentEvents(de.gematik.ti.cardreader.provider.api.events.card.CardPresentEvent cardPresentEvent)
Method that handles the CardPresentEvents and trigger the analysis of present cards
|
void |
handleCardReaderDisconnectedEvents(de.gematik.ti.cardreader.provider.api.events.CardReaderDisconnectedEvent cardReaderDisconnectedEvent)
Handle the card reader disconnection events and inform event bus subscriber about absent health card if card before known as health card and the card
is present at card reader disconnection
|
static void |
startDetection()
Start the detection of card present and absent events such as card reader disconnection events
|
static void |
stopDetection()
Stop the detection of card present and absent events such as card reader disconnection events
|
public static CardDetector getInstance()
Get the singleton instance
public static void startDetection()
Start the detection of card present and absent events such as card reader disconnection events
public static void stopDetection()
Stop the detection of card present and absent events such as card reader disconnection events
@Subscribe public void handleCardPresentEvents(de.gematik.ti.cardreader.provider.api.events.card.CardPresentEvent cardPresentEvent)
Method that handles the CardPresentEvents and trigger the analysis of present cards
cardPresentEvent
- Event for present Card@Subscribe public void handleCardAbsentEvents(de.gematik.ti.cardreader.provider.api.events.card.CardAbsentEvent cardAbsentEvent)
Handle the card absent events and inform event bus subscriber about absent health card if card before known as health card
cardAbsentEvent
- Event for absent card@Subscribe public void handleCardReaderDisconnectedEvents(de.gematik.ti.cardreader.provider.api.events.CardReaderDisconnectedEvent cardReaderDisconnectedEvent)
Handle the card reader disconnection events and inform event bus subscriber about absent health card if card before known as health card and the card is present at card reader disconnection
cardReaderDisconnectedEvent
- Event for card reader disconnection