} catch (NoPeerConnectionException e) {
throw new ProcessExecutionException(e);
}
logger.debug("Get the next user profile task of user '{}'.", userId);
NetworkContent content = dataManager.getUserProfileTask(userId);
if (content == null) {
logger.warn("Did not get an user profile task. User ID = '{}'.", userId);
context.provideUserProfileTask(null);
} else {
logger.debug("Got encrypted user profile task. User ID = '{}'", userId);
HybridEncryptedContent encrypted = (HybridEncryptedContent) content;
PrivateKey key = null;
try {
key = networkManager.getSession().getKeyPair().getPrivate();
} catch (NoSessionException e) {
throw new ProcessExecutionException(e);
}
NetworkContent decrypted = null;
try {
decrypted = H2HEncryptionUtil.decryptHybrid(encrypted, key);
} catch (InvalidKeyException | DataLengthException | IllegalBlockSizeException
| BadPaddingException | IllegalStateException | InvalidCipherTextException
| ClassNotFoundException | IOException e) {