class SseController {

    @Resource
    private AlarmEventListener alarmEventListener;

    /**
     * SSE 推送.
     *
     * @param response  响应
     * @param browserId 浏览器ID
     * @throws IOException IOEXCEPTION
     * @author <a href="mailto:xiaoQQya@126.com">xiaoQQya</a>
     * @since 2023/11/06
     */
    @GetMapping("/emit")
    public void emit(HttpServletResponse response, @RequestParam String browserId) throws IOException, InterruptedException {<FILL_FUNCTION_BODY>}
}

        response.setContentType("text/event-stream");
        response.setCharacterEncoding("utf-8");

        PrintWriter writer = response.getWriter();
        alarmEventListener.addSseEmitter(browserId, writer);

        while (!writer.checkError()) {
            Thread.sleep(1000);
            writer.write(":keep alive\n\n");
            writer.flush();
        }
        alarmEventListener.removeSseEmitter(browserId, writer);
    
<no_super_class>