pyngus/connection.py
def create_receiver(self, target_address, source_address=None,
                        event_handler=None, name=None, properties=None):
        """Factory method for creating Receive links."""
        ident = name or str(target_address)
        if ident in self._receiver_links:
            raise KeyError("Receiver %s already exists!" % ident)

        session = _SessionProxy("session-%s" % ident, self)
        session.open()
        rl = session.new_receiver(ident)
        rl.configure(target_address, source_address, event_handler, properties)
        self._receiver_links[ident] = rl
        return rl
def create_receiver(self, target_address, source_address=None,
                        event_handler=None, name=None, properties=None):
        ident = name or str(target_address)
        if ident in self._receiver_links:
            raise KeyError("Receiver %s already exists!" % ident)

        session = _SessionProxy("session-%s" % ident, self)
        session.open()
        rl = session.new_receiver(ident)
        rl.configure(target_address, source_address, event_handler, properties)
        self._receiver_links[ident] = rl
        return rl
def create_receiver ( self , target_address , source_address = None , event_handler = None , name = None , properties = None ) : ident = name or str ( target_address ) if ident in self . _receiver_links : raise KeyError ( "Receiver %s already exists!" % ident ) session = _SessionProxy ( "session-%s" % ident , self ) session . open ( ) rl = session . new_receiver ( ident ) rl . configure ( target_address , source_address , event_handler , properties ) self . _receiver_links [ ident ] = rl return rl
Factory method for creating Receive links.
Factory method for creating Receive links .