1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 __maintainer__ = 'Florian Boucault <florian@fluendo.com>'
19
20
21 from elisa.core import manager
22
24 """
25 ServiceManager instanciates the ServiceProvider components and keeps track
26 of them.
27 """
28
30 """ Start all the registered ServiceProviders.
31 """
32 self.info("Starting")
33
34 for i in self._components:
35 i.start()
36
38 """ Stop all the registered ServiceProviders.
39 """
40 self.info("Stopping")
41
42
43 for i in self._components:
44 i.stop()
45
46 manager.Manager.stop(self)
47
49 """ Clean a ServiceProvider and unregister it from the ServiceManager.
50
51 @param component: the ServiceProvider instance to unregister
52 @type component: L{elisa.base_components.service_provider.ServiceProvider}
53
54 @raise CannotUnregister : raised when the component cannot be removed
55 """
56 if manager.Manager.unregister_component(self, component):
57 component.clean()
58