public void visit(GetSessionKeyMessage message) { LOGGER.debug("Process GetSessionKeyMessage: " + message); peerAddress_ = message.getPeerAddress(); localSourceJobId_ = message.getSourceJobId(); sessionId_ = message.getSessionId(); InitSessionObject initSessionObject = null; initSessionContext_.acquireReadLock(); try { initSessionObject = initSessionContext_.tryGetInitSessionObject(sessionId_); if (initSessionObject.getSessionKey() == null) { throw new SessionRuntimeException("SessionKey null"); } } catch (SessionRuntimeException e) { endWithError(e, ErrorNotificationMethod.LOCAL); return; } finally { initSessionContext_.releaseReadLock(); } outQueue_.add( new GetSessionKeyResponseMessage( localSourceJobId_, message.getPeerAddress(), initSessionObject.getSessionKey(), sessionId_)); endWithSuccessAndClear(); }