public void register(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.add(endpoint); if (result) { int newCount = count.incrementAndGet(); if (newCount == 1) { BackgroundProcessManager.getInstance().register(this); } } }
public void register(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.add(endpoint); if (result) { int newCount = count.incrementAndGet(); if (newCount == 1) { BackgroundProcessManager.getInstance().register(this); } } }
public void register(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.add(endpoint); if (result) { int newCount = count.incrementAndGet(); if (newCount == 1) { BackgroundProcessManager.getInstance().register(this); } } }
public void register(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.add(endpoint); if (result) { int newCount = count.incrementAndGet(); if (newCount == 1) { BackgroundProcessManager.getInstance().register(this); } } }
public void register(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.add(endpoint); if (result) { int newCount = count.incrementAndGet(); if (newCount == 1) { BackgroundProcessManager.getInstance().register(this); } } }
public void register(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.add(endpoint); if (result) { int newCount = count.incrementAndGet(); if (newCount == 1) { BackgroundProcessManager.getInstance().register(this); } } }
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) { 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) { 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); }