def __init__(self, router, options): """ :param router: The router this dealer is part of. :type router: Object that implements :class:`autobahn.wamp.interfaces.IRouter`. :param options: Router options. :type options: Instance of :class:`autobahn.wamp.types.RouterOptions`. """ self._router = router self._options = options or types.RouterOptions() ## map: session -> set(registration) ## needed for removeSession self._session_to_registrations = {} ## map: session_id -> session ## needed for exclude/eligible self._session_id_to_session = {} ## map: procedure -> (registration, session) self._procs_to_regs = {} ## map: registration -> procedure self._regs_to_procs = {} ## pending callee invocation requests self._invocations = {} ## check all procedure URIs with strict rules self._option_uri_strict = self._options.uri_check == types.RouterOptions.URI_CHECK_STRICT ## supported features from "WAMP Advanced Profile" self._role_features = role.RoleDealerFeatures(caller_identification = True, progressive_call_results = True)
def __init__(self, router, options=None): """ :param router: The router this dealer is part of. :type router: Object that implements :class:`autobahn.wamp.interfaces.IRouter`. :param options: Router options. :type options: Instance of :class:`autobahn.wamp.types.RouterOptions`. """ self._router = router self._options = options or types.RouterOptions() ## map: session -> set(subscription) ## needed for removeSession self._session_to_subscriptions = {} ## map: session_id -> session ## needed for exclude/eligible self._session_id_to_session = {} ## map: topic -> (subscription, set(session)) ## needed for PUBLISH and SUBSCRIBE self._topic_to_sessions = {} ## map: subscription -> (topic, set(session)) ## needed for UNSUBSCRIBE self._subscription_to_sessions = {} ## check all topic URIs with strict rules self._option_uri_strict = self._options.uri_check == types.RouterOptions.URI_CHECK_STRICT ## supported features from "WAMP Advanced Profile" self._role_features = role.RoleBrokerFeatures( publisher_identification=True, subscriber_blackwhite_listing=True, publisher_exclusion=True)
def __init__(self, options=None, debug=False): """ Ctor. """ options = types.RouterOptions( uri_check=types.RouterOptions.URI_CHECK_LOOSE) RouterFactory.__init__(self, options, debug)
def __init__(self, options=None, debug=False): """ :param options: Default router options. :type options: Instance of :class:`autobahn.wamp.types.RouterOptions`. """ self._routers = {} self.debug = debug self._options = options or types.RouterOptions()
def __init__(self, factory, realm, options=None): """ Ctor. :param factory: The router factory this router was created by. :type factory: Object that implements :class:`autobahn.wamp.interfaces.IRouterFactory`.. :param realm: The realm this router is working for. :type realm: str :param options: Router options. :type options: Instance of :class:`autobahn.wamp.types.RouterOptions`. """ self.factory = factory self.realm = realm self._options = options or types.RouterOptions() self._broker = Broker(realm, self._options) self._dealer = Dealer(realm, self._options) self._attached = 0