Esempio n. 1
0
    def __init__(self, config=None, reactor=None):
        NativeWorkerSession.__init__(self, config, reactor)

        # factory for producing (per-realm) routers
        self._router_factory = RouterFactory()

        # factory for producing router sessions
        self._router_session_factory = RouterSessionFactory(self._router_factory)

        # map: realm ID -> RouterRealm
        self.realms = {}

        # map: realm URI -> realm ID
        self.realm_to_id = {}

        # map: component ID -> RouterComponent
        self.components = {}

        # "global" shared between all components
        self.components_shared = {
            u'reactor': reactor
        }

        # map: transport ID -> RouterTransport
        self.transports = {}
Esempio n. 2
0
    def __init__(self, config=None, reactor=None):
        NativeWorkerSession.__init__(self, config, reactor)

        # map: component ID -> ContainerComponent
        self.components = {}

        # "global" shared between all components
        self.components_shared = {u'reactor': reactor}
Esempio n. 3
0
    def __init__(self, config=None, reactor=None):
        NativeWorkerSession.__init__(self, config, reactor)

        # map: component ID -> ContainerComponent
        self.components = {}

        # when shall we exit?
        self._exit_mode = (config.extra.shutdown or self.SHUTDOWN_MANUAL)

        # "global" shared between all components
        self.components_shared = {
            u'reactor': reactor
        }