本文整理汇总了Python中core.event_bus.EventBus.unregister_handler方法的典型用法代码示例。如果您正苦于以下问题:Python EventBus.unregister_handler方法的具体用法?Python EventBus.unregister_handler怎么用?Python EventBus.unregister_handler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.event_bus.EventBus
的用法示例。
在下文中一共展示了EventBus.unregister_handler方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handler_func
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def handler_func(self, msg):
tu.azzert(msg.address == address)
tu.azzert(msg.body['message'] == json['message'])
EventBus.unregister_handler(self.id)
self.count[0] += 1
if self.count[0] == num_handlers:
tu.test_complete()
示例2: handler
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def handler(msg):
if self.received:
tu.azzert(False, "handler already called")
tu.azzert(msg.body['message'] == json['message'])
EventBus.unregister_handler(id)
self.received = True
def timer_complete(id):
tu.test_complete()
# End test on a timer to give time for other messages to arrive
vertx.set_timer(100, timer_complete)
示例3: vertx_stop
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def vertx_stop():
EventBus.unregister_handler(handler_id)
tu.unregister_all()
tu.app_stopped()
示例4: wrapped_closed_handler
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def wrapped_closed_handler():
EventBus.unregister_handler(self.write_handler_id)
if hasattr(self, "_closed_handler"):
self._closed_handler()
示例5: close
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def close(self):
"""Close the socket"""
EventBus.unregister_handler(self.handler_id)
self.java_obj.close()
示例6: reply_handler
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def reply_handler(error, msg):
tu.azzert(error != None)
EventBus.unregister_handler(id)
tu.test_complete()
示例7: reply_handler3
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def reply_handler3(reply2):
tu.azzert("reply-of-reply-of-reply" == reply2.body)
EventBus.unregister_handler(id)
tu.test_complete()
示例8: handler_func
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def handler_func(self, received):
tu.check_thread()
EventBus.unregister_handler(self.id)
received.reply(received.body)
示例9: user_handler
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def user_handler(user):
message.reply(user.body)
EventBus.unregister_handler(get_user_eb)
示例10: reply_handler
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def reply_handler(error, msg):
tu.azzert(error != None)
tu.azzert(isinstance(error, ReplyError))
tu.azzert(error.type == ReplyError.TIMEOUT)
EventBus.unregister_handler(id)
tu.test_complete()
示例11: handler_func
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def handler_func(self, received):
#print "received: %s type %s"% type(received.body, type(received.body))
tu.check_context()
EventBus.unregister_handler(self.id)
received.reply(received.body)
示例12: closing
# 需要导入模块: from core.event_bus import EventBus [as 别名]
# 或者: from core.event_bus.EventBus import unregister_handler [as 别名]
def closing(msg):
EventBus.unregister_handler(resultHandleId)