如何监听 GWT 事件总线上调度的所有事件?
我希望能够侦听在事件总线上调度的所有事件,无论类型如何。我该怎么做?
I want to be able to listen to all events dispatched on the Event Bus
, regardless of type. How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据 Thomas 的建议,以下是一个示例解决方案:
Taking a cue from Thomas's suggestion, here is a sample solution:
SimpleEventBus 不允许您执行此操作,但您可以轻松包装或扩展它并覆盖 fireEvent 等。捕获所有已调度的事件。
SimpleEventBus doesn't let you do this, but you could easily wrap or extend it and override fireEvent et al. to catch all dispatched events.