/** The update checker. */
private final UpdateChecker updateChecker;
+ /** The trust updater. */
+ private final TrustUpdater trustUpdater;
+
/** The FCP interface. */
private volatile FcpInterface fcpInterface;
* @param identityManager
* The identity manager
*/
- public Core(Configuration configuration, FreenetInterface freenetInterface, IdentityManager identityManager) {
+ public Core(Configuration configuration, FreenetInterface freenetInterface, IdentityManager identityManager, TrustUpdater trustUpdater) {
super("Sone Core");
this.configuration = configuration;
this.freenetInterface = freenetInterface;
this.soneDownloader = new SoneDownloader(this, freenetInterface);
this.imageInserter = new ImageInserter(this, freenetInterface);
this.updateChecker = new UpdateChecker(freenetInterface);
+ this.trustUpdater = trustUpdater;
}
//
loadConfiguration();
updateChecker.addUpdateListener(this);
updateChecker.start();
+ trustUpdater.start();
}
/**
soneInserter.stop();
}
}
+ trustUpdater.stop();
updateChecker.stop();
updateChecker.removeUpdateListener(this);
soneDownloader.stop();
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.core.FreenetInterface;
+import net.pterodactylus.sone.core.TrustUpdater;
import net.pterodactylus.sone.fcp.FcpInterface;
import net.pterodactylus.sone.freenet.PluginStoreConfigurationBackend;
import net.pterodactylus.sone.freenet.plugin.PluginConnector;
identityManager = new IdentityManager(webOfTrustConnector);
identityManager.setContext("Sone");
+ /* create trust updater. */
+ TrustUpdater trustUpdater = new TrustUpdater(webOfTrustConnector);
+ trustUpdater.init();
+
/* create core. */
- core = new Core(oldConfiguration, freenetInterface, identityManager);
+ core = new Core(oldConfiguration, freenetInterface, identityManager, trustUpdater);
/* create the web interface. */
webInterface = new WebInterface(this);