コード例 #1
0
 def __init__(self, connection, receiver, fetcher, credit=1):
     super(BlockingReceiver, self).__init__(connection, receiver)
     if self.link.source and self.link.source.address and self.link.source.address != self.link.remote_source.address:
         self.link.close()
         raise LinkException("Failed to open receiver %s, source does not match" % self.link.name)
     if credit: receiver.flow(credit)
     self.fetcher = fetcher
コード例 #2
0
ファイル: utils.py プロジェクト: gberginc/qpid-proton
 def __init__(self, connection, sender):
     super(BlockingSender, self).__init__(connection, sender)
     if self.link.target and self.link.target.address and self.link.target.address != self.link.remote_target.address:
         #this may be followed by a detach, which may contain an error condition, so wait a little...
         self._waitForClose()
         #...but close ourselves if peer does not
         self.link.close()
         raise LinkException("Failed to open sender %s, target does not match" % self.link.name)
コード例 #3
0
 def __init__(self, connection, link):
     self.connection = connection
     self.link = link
     self.connection.wait(lambda: not (self.link.state & Endpoint.REMOTE_UNINIT),
                          msg="Opening link %s" % link.name)
     if self.link.state & Endpoint.REMOTE_CLOSED:
         self.link.close()
         raise LinkException("Failed to open link %s" % link.name)
コード例 #4
0
 def __init__(self, connection, receiver, fetcher, credit=1):
     super(BlockingReceiver, self).__init__(connection, receiver)
     if self.link.source and self.link.source.address and self.link.source.address != self.link.remote_source.address:
         #this may be followed by a detach, which may contain an error condition, so wait a little...
         self._waitForClose()
         #...but close ourselves if peer does not
         self.link.close()
         raise LinkException("Failed to open receiver %s, source does not match" % self.link.name)
     if credit: receiver.flow(credit)
     self.fetcher = fetcher
コード例 #5
0
 def __init__(self, connection, sender):
     super(BlockingSender, self).__init__(connection, sender)
     if self.link.target and self.link.target.address and self.link.target.address != self.link.remote_target.address:
         self.link.close()
         raise LinkException("Failed to open sender %s, target does not match" % self.link.name)