use of com.biglybt.ui.console.ConsoleInput in project BiglyBT by BiglySoftware.
the class UI method createNewConsoleInput.
/**
* creates a new console input using the specified input/output streams.
* we create the new input in non-controlling mode because we don't want the 'quit'
* command to shut down the whole interface - simply this clients connection.
* @param consoleName
* @param inputStream
* @param outputStream
* @param profile
*/
public void createNewConsoleInput(String consoleName, InputStream inputStream, PrintStream outputStream, UserProfile profile) {
ConsoleInput console;
if (userManager != null) {
MultiUserConsoleInput muc = new MultiUserConsoleInput(consoleName, core, new InputStreamReader(inputStream), outputStream, Boolean.FALSE, profile);
muc.registerCommand(new UserCommand(userManager));
console = muc;
} else {
console = new ConsoleInput(consoleName, core, new InputStreamReader(inputStream), outputStream, Boolean.FALSE, profile);
System.out.println("TelnetUI: console input instantiated");
}
console.printwelcome();
console.printconsolehelp();
}
Aggregations