From: David ‘Bombe’ Roden Date: Tue, 12 Oct 2010 14:31:30 +0000 (+0200) Subject: Store high-level client in Freenet interface. X-Git-Tag: 0.1-RC1~534 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0ec4b5ec7155f86e0c96d290a246364bf3675d88;p=Sone.git Store high-level client in Freenet interface. --- diff --git a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java index 9241e35..490c253 100644 --- a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java +++ b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java @@ -18,6 +18,7 @@ package net.pterodactylus.sone.core; import net.pterodactylus.util.service.AbstractService; +import freenet.client.HighLevelSimpleClient; import freenet.node.Node; /** @@ -30,14 +31,18 @@ public class FreenetInterface extends AbstractService { /** The node to interact with. */ private final Node node; + /** The high-level client to use for requests. */ + private final HighLevelSimpleClient client; + /** * Creates a new Freenet interface. * * @param node * The node to interact with */ - public FreenetInterface(Node node) { + public FreenetInterface(Node node, HighLevelSimpleClient client) { this.node = node; + this.client = client; } } diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index f1cda58..9df7b67 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -78,7 +78,7 @@ public class SonePlugin implements FredPlugin { } /* create freenet interface. */ - FreenetInterface freenetInterface = new FreenetInterface(pluginRespirator.getNode()); + FreenetInterface freenetInterface = new FreenetInterface(pluginRespirator.getNode(), pluginRespirator.getHLSimpleClient()); /* create core. */ core = new Core();