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


Python EventBus.unregister_handler方法代码示例

本文整理汇总了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()
开发者ID:fregaham,项目名称:mod-lang-jython,代码行数:9,代码来源:test_client.py

示例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)
开发者ID:johnkewforks,项目名称:mod-lang-jython,代码行数:14,代码来源:test_client.py

示例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()
开发者ID:emangchi,项目名称:vert.x,代码行数:6,代码来源:test_client.py

示例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()
开发者ID:aaronwalker,项目名称:vert.x,代码行数:6,代码来源:net.py

示例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()
开发者ID:fregaham,项目名称:mod-lang-jython,代码行数:6,代码来源:sock_js.py

示例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()
开发者ID:johnkewforks,项目名称:mod-lang-jython,代码行数:6,代码来源:test_client.py

示例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()
开发者ID:johnkewforks,项目名称:mod-lang-jython,代码行数:6,代码来源:test_client.py

示例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)
开发者ID:johnkewforks,项目名称:mod-lang-jython,代码行数:6,代码来源:test_client.py

示例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)
开发者ID:jakubjosef,项目名称:Vert.x-File-Hosting,代码行数:5,代码来源:bus_utils.py

示例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()
开发者ID:fregaham,项目名称:mod-lang-jython,代码行数:8,代码来源:test_client.py

示例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)
开发者ID:emangchi,项目名称:vert.x,代码行数:7,代码来源:test_client.py

示例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)
开发者ID:parker1333752,项目名称:svc_analyzer,代码行数:4,代码来源:WebSocketServer.py


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