Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Method Detail

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD