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

Part of elisa.core.manager View In Hierarchy

Known subclasses: elisa.core.input_manager.InputManager, elisa.core.media_manager.MediaManager, 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).

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):
overrides elisa.core.log.Loggable.__init__
overridden in elisa.core.input_manager.InputManager, elisa.core.media_manager.MediaManager, elisa.core.resource_manager.ResourceManager
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.

Parameters | components_names | list of strings with the names of components to create (type: list )

def start(self):
overridden in elisa.core.input_manager.InputManager, elisa.core.media_manager.MediaManager, elisa.core.service_manager.ServiceManager

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):
overridden in elisa.core.input_manager.InputManager, elisa.core.media_manager.MediaManager, elisa.core.service_manager.ServiceManager
Stop clean and remove all registered components.

Returns | (type: `twisted.internet.defer.DeferredList` )

def register_component(self, component):
overridden in elisa.core.input_manager.InputManager, elisa.core.media_manager.MediaManager, elisa.core.metadata_manager.MetadataManager, elisa.core.resource_manager.ResourceManager

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 | component | the Component to register (type: `elisa.core.component.Component` )
Raises | AlreadyRegistered | when the component has already been registered
| TypeError | when the given `component` is *not* of the type `supported_components`

def unregister_component(self, component):
overridden in elisa.core.input_manager.InputManager, elisa.core.media_manager.MediaManager, elisa.core.resource_manager.ResourceManager, elisa.core.service_manager.ServiceManager

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 | component | the Component to register (type: `elisa.core.component.Component` )
Raises | CannotUnregister | raised when the component cannot be removed