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=<__builtin__.function object>, period=1)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
addObserver(*args)
Add an observer.
source code
 
deleteObserver(*args)
Remove an observer.
source code
 
__str__(self)
str(x)
source code

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

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __shared_state = {}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, startOnDemand=True, readerProc=<__builtin__.function object>, period=1)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

addObserver(*args)

source code 

Add an observer.

Overrides: Observer.Observable.addObserver

deleteObserver(*args)

source code 

Remove an observer.

Overrides: Observer.Observable.deleteObserver

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)