/** The configuration. */
private Configuration configuration;
+ /** Interface to freenet. */
+ private FreenetInterface freenetInterface;
+
/** The local Sones. */
private final Set<Sone> localSones = new HashSet<Sone>();
return this;
}
+ /**
+ * Sets the Freenet interface to use.
+ *
+ * @param freenetInterface
+ * The Freenet interface to use
+ * @return This core (for method chaining)
+ */
+ public Core freenetInterface(FreenetInterface freenetInterface) {
+ this.freenetInterface = freenetInterface;
+ return this;
+ }
+
//
// ACTIONS
//
import java.util.logging.Logger;
import net.pterodactylus.sone.core.Core;
+import net.pterodactylus.sone.core.FreenetInterface;
import net.pterodactylus.sone.freenet.PluginStoreConfigurationBackend;
import net.pterodactylus.util.config.Configuration;
import net.pterodactylus.util.config.ConfigurationException;
}
}
+ /* create freenet interface. */
+ FreenetInterface freenetInterface = new FreenetInterface(pluginRespirator.getNode());
+
/* create core. */
core = new Core();
core.configuration(configuration);
+ core.freenetInterface(freenetInterface);
/* start core! */
core.start();