Files
starRiverProperty/artifacts/decompiled/trees/cloudwalk-common-event-3.7.2-Brussels-SRX.jar.src/cn/cloudwalk/event/handler/EventHandlerMapping.java
T
反编译工作区 0a34c76a82 chore(v0.11): 全路径纳入版本库与走查整改
- .gitignore:显式放行全部 maven-*、scripts、dev-support、frontend、反1、artifacts、历史导出目录
- 新增跟踪:device-manager/device-sdk/legacy-public、davinci-manager、cwos-*、cwos-resource 等源码与附属资源
- davinci FileStorageManagerImpl:Feign Response 关闭、绝对 URL 拉流 SSRF 校验(协议/主机/解析地址)
- davinci OuterCallFeignClient:补充契约说明
- cwos-common-aks AksConstant:final 类 + 私有构造防误实例化
- device-manager DeviceConstant:沿用 DEFAULT_APPLICATIONID 拼写修正

Made-with: Cursor
2026-04-24 23:54:05 +08:00

126 lines
4.4 KiB
Java

/* */ package cn.cloudwalk.event.handler;
/* */
/* */ import cn.cloudwalk.cwos.client.event.event.BaseEvent;
/* */ import cn.cloudwalk.cwos.client.event.event.EventType;
/* */ import cn.cloudwalk.cwos.client.event.handler.EventListener;
/* */ import java.util.HashMap;
/* */ import java.util.List;
/* */ import java.util.Map;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class EventHandlerMapping
/* */ {
/* 26 */ private final Map<String, Map<EventType, Map<String, List<EventHandler>>>> handlerMap = new HashMap<>();
/* */
/* */
/* */
/* */
/* */
/* 32 */ private final Map<String, Map<String, Map<String, List<CustomEventHandler>>>> customHandlerMap = new HashMap<>();
/* */
/* */
/* */
/* */
/* */
/* 38 */ private final Map<Class<? extends EventListener>, String> listenerClassGroupMap = new HashMap<>();
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void registerHandlers(String groupId, EventType eventType, Map<String, List<EventHandler>> handlers) {
/* 48 */ Map<EventType, Map<String, List<EventHandler>>> map = this.handlerMap.get(groupId);
/* 49 */ if (null == map) {
/* 50 */ map = new HashMap<>();
/* 51 */ map.put(eventType, handlers);
/* 52 */ this.handlerMap.put(groupId, map);
/* */ } else {
/* 54 */ map.put(eventType, handlers);
/* */ }
/* */ }
/* */
/* */
/* */ public Map<String, List<EventHandler>> getServiceCodeHandlerListMap(String groupId, Class<? extends BaseEvent> eventClass) {
/* 60 */ for (EventType eventType : EventType.values()) {
/* 61 */ if (eventType.getEventClass().getClass().equals(eventClass)) {
/* 62 */ return getServiceCodeHandlerListMap(groupId, eventType);
/* */ }
/* */ }
/* 65 */ throw new IllegalArgumentException("没有找到合适的事件类型");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Map<String, List<EventHandler>> getServiceCodeHandlerListMap(String groupId, EventType eventType) {
/* 76 */ Map<EventType, Map<String, List<EventHandler>>> map = this.handlerMap.get(groupId);
/* 77 */ if (null != map) {
/* 78 */ return map.get(eventType);
/* */ }
/* 80 */ return null;
/* */ }
/* */
/* */ public Map<String, List<CustomEventHandler>> getServiceCodeCustomHandlerListMap(String groupId, String topic) {
/* 84 */ Map<String, Map<String, List<CustomEventHandler>>> map = this.customHandlerMap.get(groupId);
/* 85 */ if (null != map) {
/* 86 */ return map.get(topic);
/* */ }
/* 88 */ return null;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void registerCustomHandlers(String groupId, String topic, Map<String, List<CustomEventHandler>> handlers) {
/* 99 */ Map<String, Map<String, List<CustomEventHandler>>> map = this.customHandlerMap.get(groupId);
/* 100 */ if (null == map) {
/* 101 */ map = new HashMap<>();
/* 102 */ map.put(topic, handlers);
/* 103 */ this.customHandlerMap.put(groupId, map);
/* */ } else {
/* 105 */ map.put(topic, handlers);
/* */ }
/* */ }
/* */
/* */ public Map<String, Map<EventType, Map<String, List<EventHandler>>>> getHandlerMap() {
/* 110 */ return this.handlerMap;
/* */ }
/* */
/* */ public Map<String, Map<String, Map<String, List<CustomEventHandler>>>> getCustomHandlerMap() {
/* 114 */ return this.customHandlerMap;
/* */ }
/* */
/* */ public Map<Class<? extends EventListener>, String> getListenerClassGroupMap() {
/* 118 */ return this.listenerClassGroupMap;
/* */ }
/* */ }
/* Location: D:\星中心\cw-elevator-application-V1.0.0.20211103\cw-elevator-application-V1.0.0.20211103\lib\cloudwalk-common-event-3.7.2-Brussels-SRX.jar!\cn\cloudwalk\event\handler\EventHandlerMapping.class
* Java compiler version: 7 (51.0)
* JD-Core Version: 1.1.3
*/