From d841afb1cdfe393017c48adeaac14f5af8cb0194 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 19 Mar 2009 22:22:34 +0100 Subject: [PATCH] Allow inclusion of volatile and metadata when getting peers. --- src/net/pterodactylus/fcp/highlevel/FcpClient.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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)); } /** -- 2.7.4