|  |  |  | 
|---|
|  |  |  | private Map<HookType, Map<JSONObject, ZLMHttpHookSubscribe.Event>> allSubscribes = new ConcurrentHashMap<>(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void addSubscribe(HookType type, JSONObject hookResponse, ZLMHttpHookSubscribe.Event event) { | 
|---|
|  |  |  | allSubscribes.computeIfAbsent(type, k -> new ConcurrentHashMap<>()) | 
|---|
|  |  |  | .put(hookResponse, event); | 
|---|
|  |  |  | allSubscribes.computeIfAbsent(type, k -> new ConcurrentHashMap<>()).put(hookResponse, event); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public ZLMHttpHookSubscribe.Event getSubscribe(HookType type, JSONObject hookResponse) { | 
|---|
|  |  |  | 
|---|
|  |  |  | if (result == null) { | 
|---|
|  |  |  | result = key.getString(s).equals(hookResponse.getString(s)); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | if (key.getString(s) == null) continue; | 
|---|
|  |  |  | if (key.getString(s) == null) { | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | result = result && key.getString(s).equals(hookResponse.getString(s)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|