当前位置: 首页>>代码示例>>Python>>正文


Python AMQClient.__init__方法代码示例

本文整理汇总了Python中txamqp.protocol.AMQClient.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python AMQClient.__init__方法的具体用法?Python AMQClient.__init__怎么用?Python AMQClient.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在txamqp.protocol.AMQClient的用法示例。


在下文中一共展示了AMQClient.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     print 'init protocol'
     self._stop = False
     # callback on authenticated
     self._auth_succ = Deferred()
     # callback on read_channel opened
     self._read_opened = Deferred()
     # callback on write_channel opened
     self._write_opened = Deferred()
     # callback on read_loop started
     self._read_loop_started = Deferred()
     # callback on shutdown read loop
     self._read_loop_down = Deferred()
     # read queue timeout
     self.q_timeout = 1
     # read loop call
     self._rloop_call = None
     self._sloop_call = None
     self.read_queue = None
     self.read_chan = None
     kwargs['heartbeat'] = kwargs.get('heartbeat', 10)
     # failure traps
     #self.log.warning('AUTO SHUTDOWN 15 sec')
     #reactor.callLater(15, lambda _: self.shutdown_protocol(), (None,))
     self.__messages = set()
     AMQClient.__init__(self, *args, **kwargs)
开发者ID:winshuai,项目名称:txamqp_ext,代码行数:28,代码来源:protocol.py

示例2: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     self.log.debug('init protocol')
     self._stop = False
     # callback on authenticated
     self._auth_succ = Deferred()
     # callback on read_channel opened
     self._read_opened = Deferred()
     # callback on write_channel opened
     self._write_opened = Deferred()
     # callback on read_loop started
     self._read_loop_started = Deferred()
     # callback on shutdown read loop
     self._read_loop_down = Deferred()
     # read queue timeout
     self.q_timeout = 1
     # read loop call
     self._rloop_call = None
     self._sloop_call = None
     # ensure that we start read loop only once
     self._read_loop_enabled = False
     self.read_queue = None
     self.read_chan = None
     kwargs['heartbeat'] = kwargs.get('heartbeat', 10)
     self.__messages = set()
     AMQClient.__init__(self, *args, **kwargs)
开发者ID:cybergrind,项目名称:txamqp_ext,代码行数:27,代码来源:protocol.py

示例3: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        AMQClient.__init__(self, *args, **kwargs)

        if self.check_0_8():
            self.replyToField = "reply to"
        else:
            self.replyToField = "reply-to"

        self.thriftBasicReturnQueueLock = defer.DeferredLock()
        self.thriftBasicReturnQueues = {}
开发者ID:archsh,项目名称:txamqp,代码行数:12,代码来源:protocol.py

示例4: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
    def __init__(self, dispatcher, username='guest', password='guest',
                       vhost='/', exchange='logs', queueSize=None):
        self.dispatcher = dispatcher
        self.username = username
        self.password = password
        self.exchange = exchange
        self.queueSize = queueSize

        self.chan = None

        specDir = FilePath(__file__).parent()
        specFilePath = specDir.child('amqp0-9-1.extended.xml')
        spec = txamqp.spec.load(specFilePath.path)

        delegate = TwistedDelegate()
        AMQClient.__init__(self, delegate=delegate, vhost=vhost,
                                 spec=spec)
开发者ID:mailgun,项目名称:udplog,代码行数:19,代码来源:rabbitmq.py

示例5: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     AMQClient.__init__(self, *args, **kwargs)
     self.factory = None
     self.logTraffic = False
开发者ID:vigilo,项目名称:connector,代码行数:6,代码来源:amqp.py

示例6: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
 def __init__(self, connected_callback, *args, **kwargs):
     AMQClient.__init__(self, *args, **kwargs)
     self.connected_callback = connected_callback
开发者ID:deepakhajare,项目名称:maas,代码行数:5,代码来源:amqpclient.py

示例7: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
 def __init__(self, delegate, vhost, spec, prefetch_count, heartbeat, clock, insist):
     AMQClient.__init__(self, delegate, vhost, spec, heartbeat, clock, insist)
     self.prefetch_count = prefetch_count
开发者ID:mattbennett,项目名称:txamqp-helpers,代码行数:5,代码来源:amqp.py

示例8: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
 def __init__(self, *args, **kwargs):
     self.lock = defer.DeferredLock()
     AMQClient.__init__(self, *args, **kwargs)
开发者ID:gdoermann,项目名称:classymq,代码行数:5,代码来源:protocol.py

示例9: __init__

# 需要导入模块: from txamqp.protocol import AMQClient [as 别名]
# 或者: from txamqp.protocol.AMQClient import __init__ [as 别名]
 def __init__(self, delegate, vhost, spec, prefetch_count):
     AMQClient.__init__(self, delegate, vhost, spec)
     self.prefetch_count = prefetch_count
开发者ID:whirm,项目名称:txamqp-helpers,代码行数:5,代码来源:amqp.py


注:本文中的txamqp.protocol.AMQClient.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。