Example usage for javax.websocket CloseReason toString

List of usage examples for javax.websocket CloseReason toString

Introduction

In this page you can find the example usage for javax.websocket CloseReason toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:org.wso2.carbon.event.input.adapter.websocket.internal.WebsocketClient.java

@Override
public void onClose(Session session, javax.websocket.CloseReason closeReason) {
    if (log.isDebugEnabled()) {
        log.debug("Input ws-adaptor: WebsocketClient Endpoint closed: " + closeReason.toString()
                + "for request URI - " + session.getRequestURI());
    }//from  w w  w  .j av a2  s . c  o m
    try {
        session.close();
    } catch (IOException e) {
        log.error("Error occurred during closing session. Session ID:" + session.getId()
                + ", for request URI - " + session.getRequestURI() + ", Reason: " + e.getMessage(), e);
    }
}

From source file:org.wso2.carbon.event.input.adaptor.websocket.internal.WebsocketClient.java

@Override
public void onClose(javax.websocket.Session session, javax.websocket.CloseReason closeReason) {
    if (log.isDebugEnabled()) {
        log.debug("Input ws-adaptor: WebsocketClient Endpoint closed: " + closeReason.toString()
                + "for request URI - " + session.getRequestURI());
    }//from ww w. ja  va 2 s .  c  om
}