org.gudy.azureus2.ui.telnet
Class UI

java.lang.Object
  extended by org.gudy.azureus2.ui.common.UITemplate
      extended by org.gudy.azureus2.ui.common.UITemplateHeadless
          extended by org.gudy.azureus2.ui.telnet.UI
All Implemented Interfaces:
IUserInterface

public class UI
extends UITemplateHeadless
implements IUserInterface

this is a telnet UI that starts up a server socket that listens for new connections on a (configurable) port. when an incoming connection is recieved, we check the host against our list of allowed hosts and if this host is permitted, we start a new command line interface for that connection.

Author:
fatal

Constructor Summary
UI()
           
 
Method Summary
 void createNewConsoleInput(java.lang.String consoleName, java.io.InputStream inputStream, java.io.PrintStream outputStream, UserProfile profile)
          creates a new console input using the specified input/output streams.
 void openTorrent(java.lang.String fileName)
          shamelessly copied from the console ui.
 java.lang.String[] processArgs(java.lang.String[] args)
          Process UI specific command line arguments.
 void startUI()
          start up a server socket thread on an appropriate port as obtained from the configuration manager.
 
Methods inherited from class org.gudy.azureus2.ui.common.UITemplateHeadless
init
 
Methods inherited from class org.gudy.azureus2.ui.common.UITemplate
isStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gudy.azureus2.ui.common.IUserInterface
init, isStarted
 

Constructor Detail

UI

public UI()
Method Detail

processArgs

public java.lang.String[] processArgs(java.lang.String[] args)
Description copied from interface: IUserInterface
Process UI specific command line arguments.

Specified by:
processArgs in interface IUserInterface
Specified by:
processArgs in class UITemplate
Returns:
Unprocessed Args

startUI

public void startUI()
start up a server socket thread on an appropriate port as obtained from the configuration manager.

Specified by:
startUI in interface IUserInterface
Overrides:
startUI in class UITemplate

openTorrent

public void openTorrent(java.lang.String fileName)
shamelessly copied from the console ui. could this be extracted into a static utility method?

Specified by:
openTorrent in interface IUserInterface
Specified by:
openTorrent in class UITemplate

createNewConsoleInput

public void createNewConsoleInput(java.lang.String consoleName,
                                  java.io.InputStream inputStream,
                                  java.io.PrintStream outputStream,
                                  UserProfile profile)
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.

Parameters:
consoleName -
inputStream -
outputStream -
profile -