|  |  | 
 |  |  | import org.springframework.http.HttpStatus; | 
 |  |  | import org.springframework.http.ResponseEntity; | 
 |  |  | import org.springframework.stereotype.Component; | 
 |  |  | import org.springframework.util.ConcurrentReferenceHashMap; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  |  | 
 |  |  | import javax.servlet.http.HttpServletRequest; | 
 |  |  | 
 |  |  | import java.text.DecimalFormat; | 
 |  |  | import java.util.HashMap; | 
 |  |  | import java.util.Map; | 
 |  |  | import java.util.concurrent.ConcurrentHashMap; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @Description:针对 ZLMediaServer的hook事件订阅 | 
 |  |  | 
 |  |  |         void response(JSONObject response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     private Map<HookType, Map<JSONObject, ZLMHttpHookSubscribe.Event>> allSubscribes = new HashMap<>(); | 
 |  |  |     private Map<HookType, Map<JSONObject, ZLMHttpHookSubscribe.Event>> allSubscribes = new ConcurrentHashMap<>(); | 
 |  |  |  | 
 |  |  |     public void addSubscribe(HookType type, JSONObject hookResponse, ZLMHttpHookSubscribe.Event event) { | 
 |  |  |         Map<JSONObject, Event> eventMap = allSubscribes.get(type); |