HttpHeaders headers = request.getHeaders();
InetSocketAddress localAddr = request.getLocalAddress();
InetSocketAddress remoteAddr = request.getRemoteAddress();
StandardWebSocketSession session = new StandardWebSocketSession(headers, attrs, localAddr, remoteAddr, user);
StandardWebSocketHandlerAdapter endpoint = new StandardWebSocketHandlerAdapter(wsHandler, session);
List<Extension> extensions = new ArrayList<Extension>();
for (WebSocketExtension extension : selectedExtensions) {
extensions.add(new WebSocketToStandardExtensionAdapter(extension));