List of usage examples for org.springframework.web.servlet.mvc.method.annotation SseEmitter send
public void send(SseEventBuilder builder) throws IOException
From source file:com.bodybuilding.argos.controller.SseEmitterUtil.java
private static <T> void internalEmit(SseEmitter emitter, T data, MediaType mediaType) { try {//from w w w. j a v a 2 s .co m if (mediaType == null) { emitter.send(data); } else { emitter.send(data, mediaType); } } catch (ClientAbortException ignored) { } catch (IllegalStateException e) { if (!e.getMessage().contains("ResponseBodyEmitter is already set complete")) { throw e; } } catch (Throwable e) { throw Throwables.propagate(e); } }