use of org.springframework.web.reactive.socket.CloseStatus in project spring-framework by spring-projects.
the class AbstractListenerWebSocketSession method onError.
@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()));
}
use of org.springframework.web.reactive.socket.CloseStatus in project spring-framework by spring-projects.
the class StandardWebSocketHandlerAdapter method onClose.
@Override
public void onClose(Session session, CloseReason reason) {
if (this.delegateSession != null) {
int code = reason.getCloseCode().getCode();
this.delegateSession.handleClose(new CloseStatus(code, reason.getReasonPhrase()));
}
}
use of org.springframework.web.reactive.socket.CloseStatus in project spring-framework by spring-projects.
the class UndertowWebSocketHandlerAdapter method onFullCloseMessage.
@Override
protected void onFullCloseMessage(WebSocketChannel channel, BufferedBinaryMessage message) {
CloseMessage closeMessage = new CloseMessage(message.getData().getResource());
this.session.handleClose(new CloseStatus(closeMessage.getCode(), closeMessage.getReason()));
message.getData().free();
}
Aggregations