Package cn.mapway.ui.client.event
Class EventBus
java.lang.Object
cn.mapway.ui.client.event.EventBus
简单事件总线.
- Author:
- zhangjianshe
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid激发一个事件.booleanregister(String topic, IEventHandler handler) 向消息总线注册消息句柄.booleanunregister(String topic, IEventHandler handler) 向事件总线移除消息处理句柄.
-
Field Details
-
events
The events.
-
-
Constructor Details
-
EventBus
public EventBus()Instantiates a new event bus.
-
-
Method Details
-
register
向消息总线注册消息句柄.- Parameters:
topic- the topichandler- the handler- Returns:
- true, if successful
-
unregister
向事件总线移除消息处理句柄.- Parameters:
topic- the topichandler- the handler- Returns:
- true, if successful
-
fire
激发一个事件.- Parameters:
topic- the topictype- the typeevent- the event
-