public void unregister(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.remove(endpoint); if (result) { int newCount = count.decrementAndGet(); if (newCount == 0) { BackgroundProcessManager.getInstance().unregister(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 unregister(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.remove(endpoint); if (result) { int newCount = count.decrementAndGet(); if (newCount == 0) { BackgroundProcessManager.getInstance().unregister(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 unregister(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.remove(endpoint); if (result) { int newCount = count.decrementAndGet(); if (newCount == 0) { BackgroundProcessManager.getInstance().unregister(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 unregister(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.remove(endpoint); if (result) { int newCount = count.decrementAndGet(); if (newCount == 0) { BackgroundProcessManager.getInstance().unregister(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 unregister(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.remove(endpoint); if (result) { int newCount = count.decrementAndGet(); if (newCount == 0) { BackgroundProcessManager.getInstance().unregister(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 unregister(WsRemoteEndpointImplServer endpoint) { boolean result = endpoints.remove(endpoint); if (result) { int newCount = count.decrementAndGet(); if (newCount == 0) { BackgroundProcessManager.getInstance().unregister(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 unregisterSession(Endpoint endpoint, WsSession wsSession) { synchronized (endPointSessionMapLock) { Set<WsSession> wsSessions = endpointSessionMap.get(endpoint); if (wsSessions != null) { wsSessions.remove(wsSession); if (wsSessions.size() == 0) { endpointSessionMap.remove(endpoint); } } if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().unregister(this); } } sessions.remove(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 unregisterSession(Endpoint endpoint, WsSession wsSession) { synchronized (endPointSessionMapLock) { Set<WsSession> wsSessions = endpointSessionMap.get(endpoint); if (wsSessions != null) { wsSessions.remove(wsSession); if (wsSessions.size() == 0) { endpointSessionMap.remove(endpoint); } } if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().unregister(this); } } sessions.remove(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 unregisterSession(Endpoint endpoint, WsSession wsSession) { synchronized (endPointSessionMapLock) { Set<WsSession> wsSessions = endpointSessionMap.get(endpoint); if (wsSessions != null) { wsSessions.remove(wsSession); if (wsSessions.size() == 0) { endpointSessionMap.remove(endpoint); } } if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().unregister(this); } } sessions.remove(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 unregisterSession(Endpoint endpoint, WsSession wsSession) { Class<?> endpointClazz = endpoint.getClass(); synchronized (endPointSessionMapLock) { Set<WsSession> wsSessions = endpointSessionMap.get(endpointClazz); if (wsSessions != null) { wsSessions.remove(wsSession); if (wsSessions.size() == 0) { endpointSessionMap.remove(endpointClazz); } } if (endpointSessionMap.size() == 0) { BackgroundProcessManager.getInstance().unregister(this); } } sessions.remove(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); }