Interface PluginInterface

    • Method Detail

      • getAzureusName

        java.lang.String getAzureusName()
        Retrieve the name of the application.
        Returns:
        the Application's name
        Since:
        2.1.0.0
      • getApplicationName

        java.lang.String getApplicationName()
        Returns the name of the application that the user sees - if you need to display the name of the program, you should use this method.
        Since:
        3.0.5.3
      • getApplicationVersion

        java.lang.String getApplicationVersion()
        Retrieve the Application's version as a string.
        Returns:
        Application's version. Typically in the following formats (regexp):
        [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
        [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+_CVS
        [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+_B[0-9]+
        Since:
        2.1.0.0
      • getTracker

        Tracker getTracker()
        Gives access to the tracker functionality
        Returns:
        The tracker
        Since:
        2.0.6.0
      • getLogger

        Logger getLogger()
        Gives access to the logger
        Returns:
        The logger
        Since:
        2.0.7.0
      • getIPFilter

        IPFilter getIPFilter()
        Gives access to the IP filter
        Returns:
        An object that allows access to IP Filtering
        Since:
        2.0.8.0
      • getDownloadManager

        DownloadManager getDownloadManager()
        Gives access to the download manager
        Returns:
        An object that allows management of downloads
        Since:
        2.0.7.0
      • getTorrentManager

        TorrentManager getTorrentManager()
        Gives access to the torrent manager
        Returns:
        An object to manage torrents
        Since:
        2.0.8.0
      • getUtilities

        Utilities getUtilities()
        access to various utility functions
        Since:
        2.1.0.0
      • getShortCuts

        ShortCuts getShortCuts()
        access to a set of convenience routines for doing things in a quicker, although less structured, fashion
        Since:
        2.1.0.0
      • getUIManager

        UIManager getUIManager()
        access to UI extension features
        Since:
        2.1.0.0
      • getUpdateManager

        UpdateManager getUpdateManager()
        access to the update manager used to update plugins. required for non-Azureus SF hosted plugins (SF ones are managed automatically)
        Since:
        2.1.0.0
      • getPluginProperties

        java.util.Properties getPluginProperties()
        gives access to the plugin properties
        Returns:
        the properties from the file plugin.properties
        Since:
        2.0.4.0
      • getPluginDirectoryName

        java.lang.String getPluginDirectoryName()
        Gives access to the plugin installation path - note, if you want to use this path to store data files in, it would be better for you to use PluginConfig.getPluginUserFile(String) instead.
        Returns:
        the full path the plugin is installed in
        Since:
        2.0.4.0
      • getPerUserPluginDirectoryName

        java.lang.String getPerUserPluginDirectoryName()
        gives access to the per-user plugin directory. Useful for shared plugins that need to store per-user state. Will be same as getPluginDirectoryName for per-user installed plugins directory may not yet exist
      • getPluginName

        java.lang.String getPluginName()
        Returns the value of "plugin.name" if it exists in the properties file, otherwise the directory name is returned.
        Since:
        2.1.0.0
      • getPluginVersion

        java.lang.String getPluginVersion()
        Returns the version number of the plugin it if can be deduced from either the name of the jar file it is loaded from or the properties file. null otherwise
        Returns:
        Version number as a string, or null
        Since:
        2.1.0.0
      • getPluginID

        java.lang.String getPluginID()
        Returns an identifier used to identify this particular plugin
        Since:
        2.1.0.0
      • getPluginconfig

        PluginConfig getPluginconfig()
        Gives access to the plugin config interface
        Returns:
        the PluginConfig object associated with this plugin
      • getPluginClassLoader

        java.lang.ClassLoader getPluginClassLoader()
        gives access to the ClassLoader used to load the plugin
        Since:
        2.0.8.0
      • getLocalPluginInterface

        PluginInterface getLocalPluginInterface​(java.lang.Class plugin,
                                                java.lang.String id)
                                         throws PluginException
        Returns an initialised plugin instance with its own scope (e.g. for config params). Designed for loading secondary plugins directly from a primary one. Note - ensure that the bundled secondary plugins do *not* contain a plugin.properties as this will cause no end of problems.
        Parameters:
        plugin - must implement Plugin
        id - the unique id of this plugin (used to scope config params etc)
        Throws:
        PluginException
      • getIPC

        IPCInterface getIPC()
        Get the inter-plugin-communications interface for this plugin
      • getPlugin

        Plugin getPlugin()
        Gives access to the plugin itself
        Since:
        2.1.0.0
      • isInitialisationThread

        boolean isInitialisationThread()
        Indicates whether or not the current thread is the one responsible for running plugin initialisation
      • getPluginManager

        PluginManager getPluginManager()
        gives access to the plugin manager
        Since:
        2.1.0.0
      • getConnectionManager

        ConnectionManager getConnectionManager()
        Get the connection manager.
        Returns:
        manager
        Since:
        2.2.0.3
      • getMessageManager

        MessageManager getMessageManager()
        Get the peer messaging manager.
        Returns:
        manager
        Since:
        2.2.0.3
      • getDistributedDatabase

        DistributedDatabase getDistributedDatabase()
        Get the distributed database
        Since:
        2.2.0.3
      • getPlatformManager

        PlatformManager getPlatformManager()
        Gets the platform manager that gives access to native functionality
      • removeListener

        void removeListener​(PluginListener l)
        Since:
        2.0.7.0
      • firePluginEvent

        void firePluginEvent​(PluginEvent event)
        Fire a plugin-specific event. See PluginEvent for details of type values to use
        Parameters:
        event - plugin event
        Since:
        2.4.0.3
      • getMainlineDHTManager

        MainlineDHTManager getMainlineDHTManager()
        Returns the manager object for registering plugins that connect to the Mainline DHT.
        Since:
        3.0.4.3
      • getPluginState

        PluginState getPluginState()
        Returns an object that provides information the current state of the plugin, and provides various mechanisms to query and control plugins and their integration with the client at a low-level.
        Since:
        3.1.1.1