Class EventDispatcher
- java.lang.Object
-
- com.alibaba.nacos.client.config.impl.EventDispatcher
-
public class EventDispatcher extends Object
Event subscription and publishing tools.- Author:
- Nacos
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEventDispatcher.AbstractEventClient事件。static classEventDispatcher.AbstractEventListener事件监听器。static classEventDispatcher.ServerlistChangeEventserverList has changed
-
Constructor Summary
Constructors Constructor Description EventDispatcher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddEventListener(EventDispatcher.AbstractEventListener listener)添加事件监听器static voidfireEvent(EventDispatcher.AbstractEvent abstractEvent)发布事件,首先发布该事件暗示的其他事件,最后通知所有对应的监听器。
-
-
-
Method Detail
-
addEventListener
public static void addEventListener(EventDispatcher.AbstractEventListener listener)
添加事件监听器
-
fireEvent
public static void fireEvent(EventDispatcher.AbstractEvent abstractEvent)
发布事件,首先发布该事件暗示的其他事件,最后通知所有对应的监听器。
-
-