opencard.core.terminal
Interface Observer
- All Known Implementing Classes:
- EventGenerator
- public abstract interface Observer
This interface is used by the CardTerminalRegistry to communicate
to an interested party
added/remove card terminals and
card insertion/removal.
This interface decouples the opencard.core.event package from
the opencard.core.terminal package and allows to use the terminal
package without the events package in resource-constrained
environments.
It also allows framework users to implement their own events
propagation mechanism.
- See Also:
CardTerminalRegistry.setObserver(opencard.core.terminal.Observer)
Method Summary |
void |
updateCards(CardTerminal t,
int slot,
boolean cardInserted)
The CardTerminalRegistry calls this method when a card is inserted/
removed in one of the registered terminals.
|
boolean |
updateTerminals(Pollable p,
boolean terminalAdded)
The CardTerminalRegistry calls this method when a pollable terminal
is added or removed |
updateCards
public void updateCards(CardTerminal t,
int slot,
boolean cardInserted)
- The CardTerminalRegistry calls this method when a card is inserted/
removed in one of the registered terminals.
For pollable terminals this works only if they are polled by the
observer.
- Parameters:
t
- the terminalslot
- the slotcardInserted
- true for cardinsertions, false for card removals.
updateTerminals
public boolean updateTerminals(Pollable p,
boolean terminalAdded)
- The CardTerminalRegistry calls this method when a pollable terminal
is added or removed
- Parameters:
p
- The pollable terminal added/removedterminalAdded
- true if the terminal is added, false if the terminal is removed