MCPcopy Create free account
hub / github.com/apache/qpid-proton / __init__

Method __init__

python/proton/_utils.py:215–232  ·  view source on GitHub ↗
(
            self,
            connection: 'BlockingConnection',
            receiver: 'Receiver',
            fetcher: Optional[Fetcher],
            credit: int = 1
    )

Source from the content-addressed store, hash-verified

213 """
214
215 def __init__(
216 self,
217 connection: 'BlockingConnection',
218 receiver: 'Receiver',
219 fetcher: Optional[Fetcher],
220 credit: int = 1
221 ) -> None:
222 super(BlockingReceiver, self).__init__(connection, receiver)
223 if self.link.source and self.link.source.address and self.link.source.address != self.link.remote_source.address:
224 # this may be followed by a detach, which may contain an error condition, so wait a little...
225 self._waitForClose()
226 # ...but close ourselves if peer does not
227 self.link.close()
228 raise LinkException("Failed to open receiver %s, source does not match" % self.link.name)
229 if credit:
230 receiver.flow(credit)
231 self.fetcher = fetcher
232 self.container = connection.container
233
234 def __del__(self):
235 self.fetcher = None

Callers

nothing calls this directly

Calls 5

LinkExceptionClass · 0.85
_waitForCloseMethod · 0.80
__init__Method · 0.45
closeMethod · 0.45
flowMethod · 0.45

Tested by

no test coverage detected