@Override public void run() throws Exception { if (mappings == null) { return; } ClientEngineImpl engine = getService(); for (Map.Entry<String, String> entry : mappings.entrySet()) { engine.addOwnershipMapping(entry.getKey(), entry.getValue()); } }
@Override public void run() throws Exception { if (mappings == null) { return; } ClientEngineImpl engine = getService(); for (Map.Entry<String, String> entry : mappings.entrySet()) { engine.addOwnershipMapping(entry.getKey(), entry.getValue()); } }
private boolean doRun() throws Exception { ILogger logger = getLogger(); ClientEngineImpl engine = getService(); String memberUuid = getCallerUuid(); if (!engine.trySetLastAuthenticationCorrelationId(clientUuid, authCorrelationId)) { String message = "Server already processed a newer authentication from client with UUID " + clientUuid + ". Not applying requested ownership change to " + memberUuid; logger.info(message); throw new StubAuthenticationException(message); } Set<ClientEndpoint> endpoints = engine.getEndpointManager().getEndpoints(clientUuid); for (ClientEndpoint endpoint : endpoints) { ClientPrincipal principal = new ClientPrincipal(clientUuid, memberUuid); endpoint.authenticated(principal); } String previousMemberUuid = engine.addOwnershipMapping(clientUuid, memberUuid); if (logger.isFineEnabled()) { logger.fine("Client authenticated " + clientUuid + ", owner " + memberUuid); } return previousMemberUuid == null; }
private boolean doRun() throws Exception { ILogger logger = getLogger(); ClientEngineImpl engine = getService(); String memberUuid = getCallerUuid(); if (!engine.trySetLastAuthenticationCorrelationId(clientUuid, authCorrelationId)) { String message = "Server already processed a newer authentication from client with UUID " + clientUuid + ". Not applying requested ownership change to " + memberUuid; logger.info(message); throw new StubAuthenticationException(message); } Set<ClientEndpoint> endpoints = engine.getEndpointManager().getEndpoints(clientUuid); for (ClientEndpoint endpoint : endpoints) { ClientPrincipal principal = new ClientPrincipal(clientUuid, memberUuid); endpoint.authenticated(principal); } String previousMemberUuid = engine.addOwnershipMapping(clientUuid, memberUuid); if (logger.isFineEnabled()) { logger.fine("Client authenticated " + clientUuid + ", owner " + memberUuid); } return previousMemberUuid == null; }