Example usage for javax.websocket Session getId

List of usage examples for javax.websocket Session getId

Introduction

In this page you can find the example usage for javax.websocket Session getId.

Prototype

String getId();

Source Link

Document

Provides a unique identifier for the session.

Usage

From source file:pt.webdetails.cda.push.CdaPushQueryEndpoint.java

/**
 * Executed whenever there is an error associated with the websocket connection. We close the
 * underlying websocket implementation when this happens
 *
 * @param session the websocket session.
 * @param throwable the {@link Throwable} that occurred.
 *//* w w  w .j  a va  2s . co m*/
@Override
public void onError(Session session, Throwable throwable) {
    if (logger.isDebugEnabled()) {
        logger.debug("Error occurred in session id " + session.getId(), throwable);
    }
    this.queryHandler.getWebsocketJsonQueryEndpoint().onClose();
}