Package smartcard :: Module ReaderMonitoring :: Class ReaderMonitor
[hide private]
[frames] | no frames]

Class ReaderMonitor

source code


Class that monitors reader insertion/removal. and notify observers

note: a reader monitoring thread will be running as long as the reader monitor has observers, or ReaderMonitor.stop() is called.

It implements the shared state design pattern, where objects of the same type all share the same state, in our case essentially the ReaderMonitoring Thread. Thanks to Frank Aune for implementing the shared state pattern logics.

Instance Methods [hide private]
 
__init__(self, startOnDemand=True, readerProc=<function readers at 0x7f8dd33eb8c0>, period=1) source code
 
addObserver(*args)
Add an observer.
source code
 
deleteObserver(*args)
Remove an observer.
source code
 
__str__(self) source code

Inherited from Observer.Observable: clearChanged, countObservers, deleteObservers, hasChanged, notifyObservers, setChanged

Class Variables [hide private]
  __shared_state = {}
Method Details [hide private]

__init__(self, startOnDemand=True, readerProc=<function readers at 0x7f8dd33eb8c0>, period=1)
(Constructor)

source code 
Overrides: Synchronization.Synchronization.__init__

addObserver(*args)

source code 

Add an observer.

Overrides: Observer.Observable.addObserver

deleteObserver(*args)

source code 

Remove an observer.

Overrides: Observer.Observable.deleteObserver