opencard.core.terminal
Interface Pollable


public abstract interface Pollable

This interface must be implemented by implementations of CardTerminal if they do not generate events when a card is inserted in or removed from the card terminal.


Method Summary
 void poll()
          Checks the status of the underlying terminal device.
 

Method Detail

poll

public void poll()
          throws CardTerminalException
Checks the status of the underlying terminal device. Must generate a CardTerminalEvent if a card is being inserted or removed by calling CardTerminal.cardInserted() or CardTerminal.cardRemoved(). Alternatively the terminal could perform status checks itsself, e.g. by handling interrupts. Implementation Note: the CardTerminalRegistry calls this method of all registered Pollable terminals periodically. So the implementation of this method should not carry out lengthy operations but return as quickly as possible.
Throws:
CardTerminalException - Thrown when error occurred in poll-mechanism.