protected void registerSession(Endpoint endpoint, WsSession wsSession) { if (!wsSession.isOpen()) { // The session was closed during onOpen. No need to register it. return; } synchronized (endPointSessionMapLock) { if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().register(this); } Set<WsSession> wsSessions = endpointSessionMap.get(endpoint); if (wsSessions == null) { wsSessions = new HashSet<>(); endpointSessionMap.put(endpoint, wsSessions); } wsSessions.add(wsSession); } sessions.put(wsSession, wsSession); }
protected void registerSession(Endpoint endpoint, WsSession wsSession) { Class<?> endpointClazz = endpoint.getClass(); if (!wsSession.isOpen()) { // The session was closed during onOpen. No need to register it. return; } synchronized (endPointSessionMapLock) { if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().register(this); } Set<WsSession> wsSessions = endpointSessionMap.get(endpointClazz); if (wsSessions == null) { wsSessions = new HashSet<>(); endpointSessionMap.put(endpointClazz, wsSessions); } wsSessions.add(wsSession); } sessions.put(wsSession, wsSession); }
protected void registerSession(Endpoint endpoint, WsSession wsSession) { if (!wsSession.isOpen()) { // The session was closed during onOpen. No need to register it. return; } synchronized (endPointSessionMapLock) { if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().register(this); } Set<WsSession> wsSessions = endpointSessionMap.get(endpoint); if (wsSessions == null) { wsSessions = new HashSet<WsSession>(); endpointSessionMap.put(endpoint, wsSessions); } wsSessions.add(wsSession); } sessions.put(wsSession, wsSession); }
protected void registerSession(Endpoint endpoint, WsSession wsSession) { if (!wsSession.isOpen()) { // The session was closed during onOpen. No need to register it. return; } synchronized (endPointSessionMapLock) { if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().register(this); } Set<WsSession> wsSessions = endpointSessionMap.get(endpoint); if (wsSessions == null) { wsSessions = new HashSet<>(); endpointSessionMap.put(endpoint, wsSessions); } wsSessions.add(wsSession); } sessions.put(wsSession, wsSession); }
protected void registerSession(Endpoint endpoint, WsSession wsSession) { Class<?> endpointClazz = endpoint.getClass(); if (!wsSession.isOpen()) { // The session was closed during onOpen. No need to register it. return; } synchronized (endPointSessionMapLock) { if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().register(this); } Set<WsSession> wsSessions = endpointSessionMap.get(endpointClazz); if (wsSessions == null) { wsSessions = new HashSet<WsSession>(); endpointSessionMap.put(endpointClazz, wsSessions); } wsSessions.add(wsSession); } sessions.put(wsSession, wsSession); }
/** * {@inheritDoc} * * Overridden to make it visible to other classes in this package. */ @Override protected void registerSession(Endpoint endpoint, WsSession wsSession) { super.registerSession(endpoint, wsSession); if (wsSession.isOpen() && wsSession.getUserPrincipal() != null && wsSession.getHttpSessionId() != null) { registerAuthenticatedSession(wsSession, wsSession.getHttpSessionId()); } log.debug("registerSession: {} endpoint: {}", wsSession, endpoint); }
/** * {@inheritDoc} * * Overridden to make it visible to other classes in this package. */ @Override protected void registerSession(Endpoint endpoint, WsSession wsSession) { super.registerSession(endpoint, wsSession); if (wsSession.isOpen() && wsSession.getUserPrincipal() != null && wsSession.getHttpSessionId() != null) { registerAuthenticatedSession(wsSession, wsSession.getHttpSessionId()); } }
/** * {@inheritDoc} * * Overridden to make it visible to other classes in this package. */ @Override protected void registerSession(Endpoint endpoint, WsSession wsSession) { super.registerSession(endpoint, wsSession); if (wsSession.isOpen() && wsSession.getUserPrincipal() != null && wsSession.getHttpSessionId() != null) { registerAuthenticatedSession(wsSession, wsSession.getHttpSessionId()); } }
/** * {@inheritDoc} * * Overridden to make it visible to other classes in this package. */ @Override protected void registerSession(Endpoint endpoint, WsSession wsSession) { super.registerSession(endpoint, wsSession); if (wsSession.isOpen() && wsSession.getUserPrincipal() != null && wsSession.getHttpSessionId() != null) { registerAuthenticatedSession(wsSession, wsSession.getHttpSessionId()); } }
/** * {@inheritDoc} * * Overridden to make it visible to other classes in this package. */ @Override protected void registerSession(Endpoint endpoint, WsSession wsSession) { super.registerSession(endpoint, wsSession); if (wsSession.isOpen() && wsSession.getUserPrincipal() != null && wsSession.getHttpSessionId() != null) { registerAuthenticatedSession(wsSession, wsSession.getHttpSessionId()); } }
/** * {@inheritDoc} * * Overridden to make it visible to other classes in this package. */ @Override protected void registerSession(Endpoint endpoint, WsSession wsSession) { super.registerSession(endpoint, wsSession); if (wsSession.isOpen() && wsSession.getUserPrincipal() != null && wsSession.getHttpSessionId() != null) { registerAuthenticatedSession(wsSession, wsSession.getHttpSessionId()); } }
if (wsSession.isOpen()) { wsSession.getBasicRemote().sendPong(controlBufferBinary);
if (wsSession.isOpen()) { wsSession.getBasicRemote().sendPong(controlBufferBinary);
if (wsSession.isOpen()) { wsSession.getBasicRemote().sendPong(controlBufferBinary);
if (wsSession.isOpen()) { wsSession.getBasicRemote().sendPong(controlBufferBinary);
if (wsSession.isOpen()) { wsSession.getBasicRemote().sendPong(controlBufferBinary);