Example usage for org.springframework.web.socket CloseStatus toString

List of usage examples for org.springframework.web.socket CloseStatus toString

Introduction

In this page you can find the example usage for org.springframework.web.socket CloseStatus toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:org.metis.push.PusherBean.java

/**
 * This method is called by the web socket container after an existing
 * session has been closed./* www .  j  av a 2  s .  co m*/
 */
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {

    super.afterConnectionClosed(session, status);

    LOG.debug(getBeanName() + ": afterConnectionClosed, session id = " + session.getId() + ", status = "
            + status.toString());

    // remove the session from the session registry
    WdsSocketSession wdsSession = getWdsSessions().remove(session.getId());
    if (wdsSession == null) {
        LOG.warn(getBeanName() + ":afterConnectionClosed - this session did not exist in registry: "
                + session.getId());
        return;
    }

    // get the sql job that the session had been subsribed to and remove the
    // session from that job
    SqlJob job = wdsSession.getMyJob();
    if (job != null) {
        job.removeSession(session.getId());
    }

}