- boolean startupFailed = true;
- try {
- /* create freenet interface. */
- FreenetInterface freenetInterface = new FreenetInterface(pluginRespirator.getNode());
+ final Configuration startConfiguration;
+ if ((newConfiguration != null) && (oldConfiguration != newConfiguration)) {
+ logger.log(Level.INFO, "Setting configuration to file-based configuration.");
+ startConfiguration = newConfiguration;
+ } else {
+ startConfiguration = oldConfiguration;
+ }
+ final EventBus eventBus = new EventBus();
+
+ /* Freenet injector configuration. */
+ AbstractModule freenetModule = new AbstractModule() {
+
+ @Override
+ @SuppressWarnings("synthetic-access")
+ protected void configure() {
+ bind(PluginRespirator.class).toInstance(SonePlugin.this.pluginRespirator);
+ bind(Node.class).toInstance(SonePlugin.this.pluginRespirator.getNode());
+ }
+ };
+ /* Sone injector configuration. */
+ AbstractModule soneModule = new AbstractModule() {