public class EventRouterPatterned extends Object implements EventRouter
| Modifier and Type | Field and Description |
|---|---|
protected ReentrantLock |
ROUTING_LIST_LOCK |
| Constructor and Description |
|---|
EventRouterPatterned(RoutingFactory routerFactory) |
| Modifier and Type | Method and Description |
|---|---|
<P> void |
add(String topic,
int index,
EventListener<P> listener)
添加监听
|
List<EventListenerHolder> |
matching(String topic)
路由匹配
|
void |
remove(String topic)
移除监听
|
<P> void |
remove(String topic,
EventListener<P> listener)
移除监听
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcountprotected final ReentrantLock ROUTING_LIST_LOCK
public EventRouterPatterned(RoutingFactory routerFactory)
public <P> void add(String topic, int index, EventListener<P> listener)
add in interface EventRoutertopic - 主题index - 顺序位listener - 监听器public <P> void remove(String topic, EventListener<P> listener)
remove in interface EventRoutertopic - 主题listener - 监听器public void remove(String topic)
remove in interface EventRoutertopic - 主题public List<EventListenerHolder> matching(String topic)
matching in interface EventRouterCopyright © 2025. All rights reserved.