opencard.core.terminal
Interface Observer

All Known Implementing Classes:
EventGenerator

public 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.

Version:
$Id: Observer.java,v 1.2 1999/11/03 12:37:17 damke Exp $
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
 

Method Detail

updateCards

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 terminal
slot - the slot
cardInserted - true for cardinsertions, false for card removals.

updateTerminals

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/removed
terminalAdded - true if the terminal is added, false if the terminal is removed