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).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 |
Parameters | components_names | list of strings with the names of components to create (type: list ) |
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.Returns | (type: twisted.internet.defer.DeferredList
) |
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
|
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 |