@Override public void onError(Throwable ex) { if (this.completionMono != null) { this.completionMono.onError(ex); } int code = CloseStatus.SERVER_ERROR.getCode(); close(new CloseStatus(code, ex.getMessage())); }
@Override public Mono<Void> close(CloseStatus status) { getDelegate().close(status.getCode(), status.getReason()); return Mono.empty(); }
@Override public Mono<Void> close(CloseStatus status) { return getDelegate().getOutbound().sendClose(status.getCode(), status.getReason()); }
@Override public Mono<Void> close(CloseStatus status) { CloseMessage cm = new CloseMessage(status.getCode(), status.getReason()); if (!getDelegate().isCloseFrameSent()) { WebSockets.sendClose(cm, getDelegate(), null); } return Mono.empty(); }
@Override public Mono<Void> close(CloseStatus status) { try { CloseReason.CloseCode code = CloseCodes.getCloseCode(status.getCode()); getDelegate().close(new CloseReason(code, status.getReason())); } catch (IOException ex) { return Mono.error(ex); } return Mono.empty(); }
@Override public void onError(Throwable ex) { if (this.completionMono != null) { this.completionMono.onError(ex); } int code = CloseStatus.SERVER_ERROR.getCode(); close(new CloseStatus(code, ex.getMessage())); }
@Override public Mono<Void> close(CloseStatus status) { getDelegate().close(status.getCode(), status.getReason()); return Mono.empty(); }
@Override public Mono<Void> close(CloseStatus status) { try { CloseReason.CloseCode code = CloseCodes.getCloseCode(status.getCode()); getDelegate().close(new CloseReason(code, status.getReason())); } catch (IOException e) { return Mono.error(e); } return Mono.empty(); }
@Override public Mono<Void> close(CloseStatus status) { CloseMessage cm = new CloseMessage(status.getCode(), status.getReason()); if (!getDelegate().isCloseFrameSent()) { WebSockets.sendClose(cm, getDelegate(), null); } return Mono.empty(); }