Refine search
@Override public void onClose(javax.websocket.Session session, CloseReason reason) { CloseStatus closeStatus = new CloseStatus(reason.getCloseCode().getCode(), reason.getReasonPhrase()); try { this.handler.afterConnectionClosed(this.wsSession, closeStatus); } catch (Throwable ex) { if (logger.isWarnEnabled()) { logger.warn("Unhandled on-close exception for " + this.wsSession, ex); } } }
/** * Converts the CloseReason to a debug-friendly string. The exact format * is not defined by the specification and may change in future releases. * * @return A String representation of this CloseReason */ public String toString() { return (this.reasonPhrase == null) ? "CloseReason[" + this.closeCode.getCode() + "]" : "CloseReason[" + this.closeCode.getCode() + "," + reasonPhrase + "]"; }
/** * Converts the CloseReason to a debug-friendly string. The exact format is not defined by the specification and may * change in future releases. * * @return A String representation of this CloseReason */ @Override public String toString() { return (this.reasonPhrase == null) ? "CloseReason[" + this.closeCode.getCode() + "]" : "CloseReason[" + this.closeCode.getCode() + "," + reasonPhrase + "]"; }
/** * Converts the CloseReason to a debug-friendly string. The exact format * is not defined by the specification and may change in future releases. * * @return A String representation of this CloseReason */ public String toString() { return (this.reasonPhrase == null) ? "CloseReason[" + this.closeCode.getCode() + "]" : "CloseReason[" + this.closeCode.getCode() + "," + reasonPhrase + "]"; }
@Override public String toString() { return "CloseReason: code [" + closeCode.getCode() + "], reason [" + reasonPhrase + "]"; }
/** * Converts the CloseReason to a debug-friendly string. The exact format * is not defined by the specification and may change in future releases. * * @return A String representation of this CloseReason */ public String toString() { return (this.reasonPhrase == null) ? "CloseReason[" + this.closeCode.getCode() + "]" : "CloseReason[" + this.closeCode.getCode() + "," + reasonPhrase + "]"; }
@Override public String toString() { return "CloseReason: code [" + closeCode.getCode() + "], reason [" + reasonPhrase + "]"; }
@Override public String toString() { return "CloseReason: code [" + closeCode.getCode() + "], reason [" + reasonPhrase + "]"; }
/** * Converts the CloseReason to a debug-friendly string. The exact format * is not defined by the specification and may change in future releases. * * @return A String representation of this CloseReason */ public String toString() { return (this.reasonPhrase == null) ? "CloseReason[" + this.closeCode.getCode() + "]" : "CloseReason[" + this.closeCode.getCode() + "," + reasonPhrase + "]"; }
/** * Converts the CloseReason to a debug-friendly string. The exact format * is not defined by the specification and may change in future releases. * * @return A String representation of this CloseReason */ public String toString() { return (this.reasonPhrase == null) ? "CloseReason[" + this.closeCode.getCode() + "]" : "CloseReason[" + this.closeCode.getCode() + "," + reasonPhrase + "]"; }
@Override public void onClose(javax.websocket.Session session, javax.websocket.CloseReason closeCode) { logger.trace("{} closed {}", session, closeCode); if (request != null) { request.destroy(); webSocketProcessor.close(webSocket, closeCode.getCloseCode().getCode()); } }
removedChannel.onSessionClosed(); if (reason != null) { final int closeCode = reason.getCloseCode().getCode(); switch (closeCode) { case CLOSE_CODE_ABNORMAL:
@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())); } }
removedChannel.onSessionClosed(); if (reason != null) { final int closeCode = reason.getCloseCode().getCode(); switch (closeCode) { case CLOSE_CODE_ABNORMAL:
@Override public void close(CloseReason closeReason) { ctx.channel().writeAndFlush(new CloseWebSocketFrame(closeReason.getCloseCode().getCode(), closeReason.getReasonPhrase())); ctx.channel().close(); this.isOpen = false; }
@OnClose public void onClose(CloseReason reason) { if (reason.getCloseCode().getCode() == 1002) { // Protocol error setError(new CucumberException("Protocol error")); } sessionFuture.cancel(true); } }
/** * On close. * * @param session * the session * @param closeReason * the close reason */ public void onClose(final Session session, final CloseReason closeReason) { LOG.info("Connection closed:" + closeReason.getReasonPhrase() + "(" + closeReason.getCloseCode().getCode() + ":" + closeReason.getCloseCode().toString() + ")"); setConnected(false); }
@Override public void onClose(javax.websocket.Session session, CloseReason reason) { CloseStatus closeStatus = new CloseStatus(reason.getCloseCode().getCode(), reason.getReasonPhrase()); try { this.handler.afterConnectionClosed(this.wsSession, closeStatus); } catch (Throwable ex) { if (logger.isWarnEnabled()) { logger.warn("Unhandled on-close exception for " + this.wsSession, ex); } } }
@Override public void onClose(javax.websocket.Session session, CloseReason reason) { CloseStatus closeStatus = new CloseStatus(reason.getCloseCode().getCode(), reason.getReasonPhrase()); try { this.handler.afterConnectionClosed(this.wsSession, closeStatus); } catch (Throwable ex) { if (logger.isWarnEnabled()) { logger.warn("Unhandled on-close exception for " + this.wsSession, ex); } } }
@Override public void onConnectionClose(final CloseReason reason) { try { frontendSession.close(reason.getCloseCode().getCode(), reason.getReasonPhrase()); } finally { /* do the cleaning business in seperate thread so we don't block */ pool.execute(new Runnable() { @Override public void run() { closeQuietly(); } }); } }