From: David ‘Bombe’ Roden Date: Thu, 19 Mar 2009 21:22:34 +0000 (+0100) Subject: Allow inclusion of volatile and metadata when getting peers. X-Git-Tag: v0.1.1~83 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d841afb1cdfe393017c48adeaac14f5af8cb0194;p=jFCPlib.git Allow inclusion of volatile and metadata when getting peers. --- diff --git a/src/net/pterodactylus/fcp/highlevel/FcpClient.java b/src/net/pterodactylus/fcp/highlevel/FcpClient.java index 78a5064..3014aa9 100644 --- a/src/net/pterodactylus/fcp/highlevel/FcpClient.java +++ b/src/net/pterodactylus/fcp/highlevel/FcpClient.java @@ -183,13 +183,17 @@ public class FcpClient { /** * Returns all peers that the node has. * + * @param withMetadata + * true to include peer metadata + * @param withVolatile + * true to include volatile peer data * @return A set containing the node’s peers * @throws IOException * if an I/O error occurs * @throws FcpException * if an FCP error occurs */ - public Set getPeers() throws IOException, FcpException { + public Set getPeers(final boolean withMetadata, final boolean withVolatile) throws IOException, FcpException { final Set peers = new HashSet(); ExtendedFcpAdapter fcpListener = new ExtendedFcpAdapter() { @@ -199,7 +203,7 @@ public class FcpClient { @Override @SuppressWarnings("synthetic-access") public void run() throws IOException { - fcpConnection.sendMessage(new ListPeers("list-peers")); + fcpConnection.sendMessage(new ListPeers("list-peers", withMetadata, withVolatile)); } /**