import net.pterodactylus.xdcc.data.Network.NetworkBuilder;
import net.pterodactylus.xdcc.data.Network.ServerBuilder;
import net.pterodactylus.xdcc.ui.stdin.CommandReader;
+import net.pterodactylus.xdcc.ui.stdin.DownloadFailure;
+import net.pterodactylus.xdcc.ui.stdin.DownloadFailures;
import net.pterodactylus.xdcc.ui.stdin.NetworkAdapter;
-import net.pterodactylus.xdcc.ui.telnet.TelnetInterface;
import com.google.common.eventbus.AsyncEventBus;
import com.google.common.eventbus.EventBus;
}
}
- CommandReader commandReader = new CommandReader(core, new InputStreamReader(System.in, "UTF-8"), new OutputStreamWriter(System.out, "UTF-8"));
+ DownloadFailures downloadFailures = new DownloadFailures();
+
+ CommandReader commandReader = new CommandReader(core, new InputStreamReader(System.in, "UTF-8"), new OutputStreamWriter(System.out, "UTF-8"), downloadFailures);
commandReader.start();
eventBus.register(commandReader);
- TelnetInterface telnetInterface = new TelnetInterface(core, configuration.getTelnetPort());
- telnetInterface.start();
- eventBus.register(telnetInterface);
-
- NetworkAdapter networkAcceptor = new NetworkAdapter(eventBus, core);
+ NetworkAdapter networkAcceptor = new NetworkAdapter(eventBus, (reader, writer) -> new CommandReader(core, reader, writer, downloadFailures), configuration.getTelnetPort());
networkAcceptor.start();
core.start();