@Override public Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp) { if (req.getSession() != null) { long userId = (Long) req.getSession().getAttribute(SessionResource.USER_ID_KEY); return new AsyncSocket(userId); } else { return null; } } });
@Override public Object getHttpSession() { return request.getSession(); }
@Override public Object createWebSocket(ServletUpgradeRequest req, ServletUpgradeResponse resp) { ParticipantId loggedInUser = provider.sessionManager.getLoggedInUser(req.getSession()); return new WebSocketConnection(loggedInUser, provider).getWebSocketServerChannel(); } });
HttpSession session = servletUpgradeRequest.getSession(); if (session != null) { ServletGraniteContext.createThreadInstance(gravity.getGraniteConfig(), gravity.getServicesConfig(),