List of usage examples for javax.websocket.server HandshakeRequest getUserPrincipal
Principal getUserPrincipal();
From source file:freddo.dtalk2.broker.servlet.DTalkServerEndpoint.java
@OnOpen public void onOpen(Session session, EndpointConfig config) { LOG.trace(">>> onOpen: {}, userProperties: {}", session.getId(), config.getUserProperties()); mConfig = config;/* w ww . j a va2s.co m*/ mSession = session; if (LOG.isDebugEnabled()) { HandshakeRequest req = getHandshakeRequest(); HttpSession httpSession = (HttpSession) req.getHttpSession(); LOG.debug("================================="); LOG.debug("QueryString : {}", req.getQueryString()); LOG.debug("RequestURI : {}", req.getRequestURI()); LOG.debug("Headers : {}", req.getHeaders()); LOG.debug("UserPrincipal : {}", req.getUserPrincipal()); LOG.debug("ParameterMap : {}", req.getParameterMap()); LOG.debug("================================="); if (httpSession != null) { Enumeration<String> e = httpSession.getAttributeNames(); while (e.hasMoreElements()) { final String attr = e.nextElement(); LOG.debug("Session[{}]: {}", attr, httpSession.getAttribute(attr)); } LOG.debug("================================="); } } // TODO register connection & notify context listener }