From: David ‘Bombe’ Roden Date: Mon, 1 Nov 2010 20:47:11 +0000 (+0100) Subject: Implement “ping” command. X-Git-Tag: 0.2-RC1~68 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=470ae9420753b23119c103976f5cf060e3cdcd08;p=Sone.git Implement “ping” command. --- diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java b/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java index 4758d95..a8806c1 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/WebOfTrustConnector.java @@ -215,6 +215,17 @@ public class WebOfTrustConnector implements ConnectorListener { performRequest(SimpleFieldSetConstructor.create().put("Message", "RemoveProperty").put("Identity", ownIdentity.getId()).put("Property", name).get(), "PropertyRemoved"); } + /** + * Pings the Web of Trust plugin. If the plugin can not be reached, a + * {@link PluginException} is thrown. + * + * @throws PluginException + * if the plugin is not loaded + */ + public void ping() throws PluginException { + performRequest(SimpleFieldSetConstructor.create().put("Message", "Ping").get(), "Pong"); + } + // // PRIVATE ACTIONS //