@Override public void call(final ClientSession dolphinSession) { onSessionEnds(dolphinSession.getId()); } });
@Override public void call(final ClientSession dolphinSession) { onSessionEnds(dolphinSession.getId()); } });
public String getId() { return clientSession.getId(); }
public String getId() { return clientSession.getId(); }
@Override public void sessionDestroyed(final ClientSession clientSession) { Assert.requireNonNull(clientSession, "clientSession"); sessionMutexMap.remove(clientSession.getId()); }
@Override public String getDolphinSessionId() { return getSession().getId(); }
@Override public String getConversationId() { return getClientSession().getId(); }
@Override public String getDolphinSessionId() { return getSession().getId(); }
private void add(HttpSession httpSession, ClientSession clientSession) { Lock lock = getOrCreateClientSessionLockForHttpSession(httpSession); lock.lock(); try { getOrCreateClientSessionMapInHttpSession(httpSession).put(clientSession.getId(), clientSession); } finally { lock.unlock(); } }
public String createClientSession(HttpSession httpSession) throws MaxSessionCountReachedException { if (!canAddInSession(httpSession)) { throw new MaxSessionCountReachedException(); } final ClientSession clientSession = new HttpClientSessionImpl(httpSession); add(httpSession, clientSession); lifecycleHandler.onSessionCreated(clientSession); LOG.trace("Created new DolphinContext {} in http session {}", clientSession.getId(), httpSession.getId()); return clientSession.getId(); }
private void add(final ClientSession clientSession, final DolphinContext context) { Assert.requireNonNull(clientSession, "clientSession"); Assert.requireNonNull(context, "context"); clientSession.setAttribute(DOLPHIN_CONTEXT_ATTRIBUTE_NAME, context); weakContextMap.put(clientSession.getId(), new WeakReference<>(context)); }
private void add(final ClientSession clientSession, final DolphinContext context) { Assert.requireNonNull(clientSession, "clientSession"); Assert.requireNonNull(context, "context"); clientSession.setAttribute(DOLPHIN_CONTEXT_ATTRIBUTE_NAME, context); weakContextMap.put(clientSession.getId(), new WeakReference<>(context)); }
@Override public void sessionCreated(final ClientSession clientSession) { Assert.requireNonNull(clientSession, "clientSession"); final Mutex mutex = new Mutex(); clientSession.setAttribute(SESSION_MUTEX_ATTRIBUTE, mutex); sessionMutexMap.put(clientSession.getId(), new WeakReference<>(mutex)); }
public void executeTasks() { final ClientSession currentSession = sessionProvider.getCurrentClientSession(); if (currentSession == null || !dolphinSessionId.equals(currentSession.getId())) { throw new IllegalStateException("Not in Dolphin Platform session " + dolphinSessionId);
public void executeTasks() { final ClientSession currentSession = sessionProvider.getCurrentClientSession(); if (currentSession == null || !dolphinSessionId.equals(currentSession.getId())) { throw new IllegalStateException("Not in Dolphin Platform session " + dolphinSessionId);
LOG.trace("receiving RPM request for client session {} in http session {} from client with user-agent {}", clientSession.getId(), httpSession.getId(), userAgent); } catch (Exception e) { response.setStatus(HttpServletResponse.SC_BAD_REQUEST); LOG.error("Can not parse request! (DolphinContext " + clientSession.getId() + ")", e); return; LOG.trace("Request for DolphinContext {} in http session {} contains {} commands", clientSession.getId(), httpSession.getId(), commands.size());
LOG.trace("receiving RPM request for client session {} in http session {} from client with user-agent {}", clientSession.getId(), httpSession.getId(), userAgent); } catch (Exception e) { response.setStatus(HttpServletResponse.SC_BAD_REQUEST); LOG.error("Can not parse request! (DolphinContext " + clientSession.getId() + ")", e); return; LOG.trace("Request for DolphinContext {} in http session {} contains {} commands", clientSession.getId(), httpSession.getId(), commands.size());