@Override public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception { HttpSession session = getSession(request); if (session != null) { if (isCopyHttpSessionId()) { attributes.put(HTTP_SESSION_ID_ATTR_NAME, session.getId()); } Enumeration<String> names = session.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); if (isCopyAllAttributes() || getAttributeNames().contains(name)) { attributes.put(name, session.getAttribute(name)); } } } return true; }
@Override public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception { HttpSession session = getSession(request); if (session != null) { if (isCopyHttpSessionId()) { attributes.put(HTTP_SESSION_ID_ATTR_NAME, session.getId()); } Enumeration<String> names = session.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); if (isCopyAllAttributes() || getAttributeNames().contains(name)) { attributes.put(name, session.getAttribute(name)); } } } return true; }
@Override public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception { HttpSession session = getSession(request); if (session != null) { if (isCopyHttpSessionId()) { attributes.put(HTTP_SESSION_ID_ATTR_NAME, session.getId()); } Enumeration<String> names = session.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); if (isCopyAllAttributes() || getAttributeNames().contains(name)) { attributes.put(name, session.getAttribute(name)); } } } return true; }