Class e.c.m.Manager(log.Loggable):

Part of elisa.core.manager View In Hierarchy

Known subclasses: elisa.core.input_manager.InputManager, elisa.core.metadata_manager.MetadataManager, elisa.core.resource_manager.ResourceManager, elisa.core.service_manager.ServiceManager

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).
Instance Variables_componentsComponents currently registered in the manager (type: elisa.core.component.Component list )
Line # Kind Name Docs
54 Method __init__ Initialize the _components instance variable and the
63 Method load_components Load a list of components in sequence.
105 Method start Start a loop or something to initialize the Manager. Can
112 Method stop Stop clean and remove all registered components.
125 Method register_component Register a new Component
147 Method unregister_component Unregister a component from the Manager
def __init__(self):
Initialize the _components instance variable and the Manager as a Loggable object.
def load_components(self, components_names):
Load a list of components in sequence.
Parameterscomponents_nameslist of strings with the names of components to create (type: list )
def start(self):

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.
def stop(self):
Stop clean and remove all registered components.
Returns (type: twisted.internet.defer.DeferredList )
def register_component(self, component):

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.
Parameterscomponentthe Component to register (type: elisa.core.component.Component )
RaisesAlreadyRegisteredwhen the component has already been registered
TypeErrorwhen the given component is *not* of the type supported_components
def unregister_component(self, component):

Unregister a component from the Manager

Remove the Component instance from our components list if it's there. Returns the result of the operation.
Parameterscomponentthe Component to register (type: elisa.core.component.Component )
RaisesCannotUnregisterraised when the component cannot be removed
API Documentation for Elisa Media Center, generated by pydoctor at 2008-11-03 19:10:55.