}
/**
+ * Returns the FCP client for the given node.
+ *
+ * @param node
+ * The node to get the FCP client for
+ * @return The FCP client for the given node, or {@code null} if the node
+ * does not have an associated FCP client
+ */
+ FcpClient getFcpClient(Node node) {
+ return nodeClients.get(node);
+ }
+
+ /**
* Generates a new SSK key pair.
*
* @return An array with the private key at index <code>0</code> and the
if (nodes.isEmpty()) {
throw new NoNodeException("no node configured");
}
+ FcpException fcpException = null;
for (FcpClient fcpClient : nodeClients.values()) {
try {
SSKKeypair sskKeypair = fcpClient.generateKeyPair();
return new String[] { sskKeypair.getInsertURI(), sskKeypair.getRequestURI() };
} catch (FcpException fcpe1) {
- /* ignore, we’ll throw later on if needs be. */
+ fcpException = fcpe1;
}
}
- throw new JSiteException("Could not get SSK key pair from any node.");
+ throw new JSiteException("Could not get SSK key pair from any node.", fcpException);
}
//