Package elisa :: Package core :: Module manager :: Class Manager
[hide private]
[frames] | no frames]

Class Manager

source code


A Manager is a Component container

Components can be registered and unregistered from the Manager.

Optionnally the manager can implement start/stop methods if it needs to handle any kind of loop (example: media sources scanning, input events polling, etc). start/stop methods are called by the parent object (application).

Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]
 
__init__(self)
Initialize the _components instance variable and the Manager as a Loggable object.
source code
 
initialize(self)
This function is called when the application has initialized completely
source code
 
_load_providers(self)
Ask the plugin registry to create all the providers components defined in section 'general' of the config
source code
 
start(self)
Start a loop or something to initialize the Manager.
source code
twisted.internet.defer.DeferredList
stop(self)
Stop clean and remove all registered components.
source code
bool
component_registered(self, component)
Check if a component is registed in the Manager or not
source code
 
register_component(self, component)
Register a new Component
source code
 
unregister_component(self, component)
Unregister a component from the Manager
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]
 
__classinit__(cls, new_attrs)
Given a class and a new set of attributes (as passed in by __classinit__), create or modify properties based on functions with special names ending in __get, __set, and __del.
source code
Class Variables [hide private]
  name = 'manager'

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]
elisa.core.component.Component list _components
Components currently registered in the manager
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initialize the _components instance variable and the Manager as a Loggable object.
Overrides: log.Loggable.__init__

start(self)

source code 

Start a loop or something to initialize the Manager. Can also look for new components to register in this method.

Does nothing by default, override if needed.

component_registered(self, component)

source code 
Check if a component is registed in the Manager or not
Parameters:
Returns: bool

register_component(self, component)

source code 

Register a new Component

Store a new Component in our components list. Returns the result of the operation. If the component is already registered, don't register it twice.
Parameters:
Raises:

unregister_component(self, component)

source code 

Unregister a component from the Manager

Remove the Component instance from our components list if it's there. Returns the result of the operation.
Parameters:
Raises: