

def addRoute(self, destination, xs):
    '\n        Add a new route.\n\n        The passed XML Stream C{xs} will have an observer for all stanzas\n        added to route its outgoing traffic. In turn, traffic for\n        C{destination} will be passed to this stream.\n\n        @param destination: Destination of the route to be added as a host name\n                            or C{None} for the default route.\n        @type destination: C{str} or C{NoneType}.\n        @param xs: XML Stream to register the route for.\n        @type xs: L{EventDispatcher<utility.EventDispatcher>}.\n        '
    self.routes[destination] = xs
    xs.addObserver('/*', self.route)

dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/protocols/jabber/component.py Router.addRoute/original