Package wtf :: Module services :: Class ServiceManager
[hide private]
[frames] | no frames]

Class ServiceManager

source code

object --+
         |
        ServiceManager

Service manager
Instance Methods [hide private]
 
__init__(self)
Initialization
source code
 
__del__(self)
Destruction
source code
 
finalize(self)
Lock the manager.
source code
 
add(self, service)
Add a new service
source code
callable
apply(self, app)
Apply the middlewares to the application
source code
 
shutdown(self)
Shutdown the services
source code

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

Instance Variables [hide private]
bool _down = False
Manager was shut down
bool _finalized = False
Manager was finalized
list _services = ()
List of services
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initialization
Overrides: object.__init__

finalize(self)

source code 
Lock the manager. No more services can be added

apply(self, app)

source code 
Apply the middlewares to the application
Parameters:
  • app (callable) - The WSGI application callable to wrap
Returns: callable
Wrapped application (if there are middlewares to apply, the original callable otherwise)