Package buildxml :: Package xmlgetter :: Module controller :: Class Controller
[hide private]
[frames] | no frames]

Class Controller

source code


The controller has one central function run() which loads all plugins and portals, and runs their run function. Also it collects statistics about each plugins run and makes it available via the stats property.

Instance Methods [hide private]
 
__init__(self, NO_NET=False, plugin=None, source=None)
Initialize the Controller.
source code
 
run(self)
Run all the plugins and collect statistics in self.stats .
source code

Inherited from log.BaseLogger: logger

Inherited from log.BaseLogger (private): _getLogger

Class Variables [hide private]

Inherited from log.BaseLogger (private): _loggers

Instance Variables [hide private]
bool NO_NET = None
Run in no net mode?
Stats stats = None
Stats gathered from the plugins that have been run by the controller.
list _plugins = None
List of all plugin instances, whether generic portal plugin or normal plugin instances.

Inherited from log.BaseLogger (private): _source_name

Method Details [hide private]

__init__(self, NO_NET=False, plugin=None, source=None)
(Constructor)

source code 

Initialize the Controller.

Parameters:
  • NO_NET (bool) - If False the run function will call the plugins in net mode, which lets them retrieve all data from the net. Otherwise possibly existing data from a prevoius run will be used instead.
Overrides: log.BaseLogger.__init__

run(self)

source code 

Run all the plugins and collect statistics in self.stats .

Returns:
True if all plugins returned True from their run() function, False otherwise.

To Do: TODO return values