|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--opencard.core.terminal.CardTerminalRegistry
The CardTerminalRegistry keeps track of the installed CardTerminals registered within a system. You can get an enumeration of the registered CardTerminals via CardTerminalRegistry.getCardTerminals().
NOTE that there may be a difference between the terminals physically attached to your computer and those registered in the registry.
Using the add()/remove () methods you can dynamically add to and remove card terminals from the registry. Usually however this will be done automatically by SmartCard.start () based on the information provided by the Opencard properties.
CardTerminal
,
CardTerminalFactory
,
CardID
Field Summary | |
protected java.util.Hashtable |
ctListeners
table with all registered CTListener-objects |
Method Summary | |
void |
add(CardTerminal terminal)
Adds a CardTerminal instance to the registry. |
void |
addCTListener(CTListener listener)
Deprecated. use EventGenerator.addCTListener |
void |
addPollable(Pollable p)
Adds a Pollable card terminal to the observer's list of pollable terminals. |
protected void |
cardInserted(CardTerminal terminal,
int slotID)
Notify listeners that a card was inserted into a slot of a terminal. |
protected void |
cardRemoved(CardTerminal terminal,
int slotID)
Notify listeners that a card was removed from a slot of this terminal. (utility method). |
CardTerminal |
cardTerminalForName(java.lang.String name)
Iterates over the registered terminals and searches for one with the given name. |
int |
countCardTerminals()
Gets the number of registered CardTerminals. |
void |
createEventsForPresentCards(CTListener ctListener)
Deprecated. use EvenGenerator.createEventsForPresentCards |
java.util.Enumeration |
getCardTerminals()
Gets all registered CardTerminal instances. |
int |
getPollInterval()
Deprecated. |
static CardTerminalRegistry |
getRegistry()
Gets the system wide CardTerminalRegistry. |
boolean |
remove(CardTerminal terminal)
Closes the card terminal and removes it from the registry. |
boolean |
remove(java.lang.String name)
Remove the card terminal named name. |
void |
removeCTListener(CTListener listener)
Deprecated. use EventGenerator.removeCTListener() instead |
boolean |
removePollable(Pollable p)
Removes a Pollable card terminal from the observer's list of terminals to be polled. |
void |
setObserver(Observer o)
The Observer is the bridge to the opencard.core.event package which creates events for card insertion/card removal |
void |
setPollInterval(int duration)
Deprecated. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.Hashtable ctListeners
Method Detail |
public void setObserver(Observer o)
public static CardTerminalRegistry getRegistry()
public void add(CardTerminal terminal) throws CardTerminalException
terminal
- The CardTerminal to add.public void addPollable(Pollable p)
p
- The Pollable terminal to add.public CardTerminal cardTerminalForName(java.lang.String name)
name
- The name of the card terminal to search for.public int countCardTerminals()
public java.util.Enumeration getCardTerminals()
public boolean remove(java.lang.String name) throws CardTerminalException
name
- The name of the card terminal to unregister.public boolean remove(CardTerminal terminal) throws CardTerminalException
terminal
- The reference to the CardTerminal object to unregister.CardTerminal.close()
public boolean removePollable(Pollable p)
p
- The Pollable to be removed.protected void cardInserted(CardTerminal terminal, int slotID)
terminal
- terminal where a card was insertedslot
- slot where a card was insertedprotected void cardRemoved(CardTerminal terminal, int slotID)
slot
- slot number of the slot where a card was removedpublic void setPollInterval(int duration)
public void addCTListener(CTListener listener)
public void createEventsForPresentCards(CTListener ctListener) throws CardTerminalException
public int getPollInterval()
public void removeCTListener(CTListener listener)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |