Class ConsoleInput

java.lang.Object
java.lang.Thread
com.biglybt.ui.console.ConsoleInput
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
MultiUserConsoleInput

public class ConsoleInput extends Thread
  • Field Details

  • Constructor Details

  • Method Details

    • registerPluginCommand

      public static void registerPluginCommand(Class clazz)
      can be used by plugins to register console commands since they may not have access to each ConsoleInput object that is created.
    • unregisterPluginCommand

      public static void unregisterPluginCommand(Class clazz)
    • initialise

      protected void initialise()
    • destroyalise

      private void destroyalise()
    • downloadTorrent

      public void downloadTorrent(String filename, String outputDir)
      begins the download of the torrent in the specified file, downloading it to the specified output directory. We also annotate the download with the current username
      Parameters:
      filename -
      outputDir -
    • downloadRemoteTorrent

      public void downloadRemoteTorrent(String url, String outputDir)
      downloads the remote torrent file. once we have downloaded the .torrent file, we pass the data to the downloadTorrent() method for further processing
      Parameters:
      url -
      outputDir -
    • downloadTorrent

      public void downloadTorrent(String fileName)
      downloads a torrent on the local file system to the default save directory
      Parameters:
      fileName -
    • downloadRemoteTorrent

      public void downloadRemoteTorrent(String url)
      downloads the remote torrent file. once we have downloaded the .torrent file, we pass the data to the downloadTorrent() method for further processing
    • registerPluginCommands

      private void registerPluginCommands()
      instantiates each of the plugin commands and registers t
    • registerLogHandler

      private void registerLogHandler()
    • unregisterLogHandler

      private void unregisterLogHandler()
    • registerAlertHandler

      private void registerAlertHandler()
    • unregisterAlertHandler

      private void unregisterAlertHandler()
    • registerCommands

      protected void registerCommands()
      registers the commands available to be executed from this console
    • registerCommand

      protected void registerCommand(IConsoleCommand command)
      Parameters:
      set -
    • unregisterCommand

      protected void unregisterCommand(IConsoleCommand command)
    • unregisterCommand

      protected void unregisterCommand(String commandName)
    • quit

      private void quit(boolean finish)
    • printwelcome

      public void printwelcome()
    • printconsolehelp

      public void printconsolehelp()
    • printconsolehelp

      private void printconsolehelp(PrintStream os)
    • invokeCommand

      public boolean invokeCommand(String command, List cargs)
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • getAliasesFile

      private File getAliasesFile()
    • loadAliases

      private void loadAliases() throws IOException
      read in the aliases from the alias properties file
      Throws:
      IOException
    • saveAliases

      public void saveAliases()
      writes the aliases back out to the alias file
    • getUserProfile

      public UserProfile getUserProfile()
      Returns:
      Returns the userProfile.
    • getDefaultSaveDirectory

      public String getDefaultSaveDirectory()
      returns the default directory that torrents should be saved to unless otherwise specified
      Returns:
    • registerUpdateChecker

      protected void registerUpdateChecker()
    • getCore

      public Core getCore()
    • getGlobalManager

      public GlobalManager getGlobalManager()
    • getErrorLogEvents

      public List<LogEvent> getErrorLogEvents()