com.aelitis.azureus.plugins.magnet
Class MagnetPlugin
java.lang.Object
  
com.aelitis.azureus.plugins.magnet.MagnetPlugin
- All Implemented Interfaces: 
 - Plugin
 
public class MagnetPlugin
- extends Object
- implements Plugin
  
- Author:
 
  - parg
 
 
 
| 
Method Summary | 
 void | 
addListener(MagnetPluginListener listener)
 
            | 
 byte[] | 
badge()
 
            | 
protected  void | 
doSecondaryLookup(MagnetPluginProgressListener listener,
                  Object[] result,
                  byte[] hash,
                  Set<String> networks_enabled,
                  String args)
 
            | 
 byte[] | 
download(MagnetPluginProgressListener listener,
         byte[] hash,
         String args,
         InetSocketAddress[] sources,
         long timeout,
         int flags)
 
            | 
 URL | 
getMagnetURL(byte[] hash)
 
            | 
 URL | 
getMagnetURL(Download d)
 
            | 
protected  String | 
getMessageText(String resource,
               String... params)
 
            | 
protected  byte[] | 
getSecondaryLookupResult(Object[] result)
 
            | 
 void | 
initialize(PluginInterface _plugin_interface)
 
          This method is called when the Plugin is loaded by Azureus | 
 boolean | 
isNetworkEnabled(String net)
 
            | 
static void | 
load(PluginInterface plugin_interface)
 
            | 
 void | 
removeListener(MagnetPluginListener listener)
 
            | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
FL_NONE
public static final int FL_NONE
- See Also:
 - Constant Field Values
 
FL_DISABLE_MD_LOOKUP
public static final int FL_DISABLE_MD_LOOKUP
- See Also:
 - Constant Field Values
 
MagnetPlugin
public MagnetPlugin()
load
public static void load(PluginInterface plugin_interface)
 
 
initialize
public void initialize(PluginInterface _plugin_interface)
- Description copied from interface: 
Plugin 
- This method is called when the Plugin is loaded by Azureus
- Specified by:
 initialize in interface Plugin
 
- Parameters:
 _plugin_interface - the interface that the plugin must use to communicate with Azureus
 
 
isNetworkEnabled
public boolean isNetworkEnabled(String net)
 
 
getMagnetURL
public URL getMagnetURL(Download d)
 
 
getMagnetURL
public URL getMagnetURL(byte[] hash)
 
 
badge
public byte[] badge()
 
 
download
public byte[] download(MagnetPluginProgressListener listener,
                       byte[] hash,
                       String args,
                       InetSocketAddress[] sources,
                       long timeout,
                       int flags)
                throws MagnetURIHandlerException
 
- Throws:
 MagnetURIHandlerException
 
doSecondaryLookup
protected void doSecondaryLookup(MagnetPluginProgressListener listener,
                                 Object[] result,
                                 byte[] hash,
                                 Set<String> networks_enabled,
                                 String args)
 
 
getSecondaryLookupResult
protected byte[] getSecondaryLookupResult(Object[] result)
                                   throws ResourceDownloaderException
 
- Throws:
 ResourceDownloaderException
 
getMessageText
protected String getMessageText(String resource,
                                String... params)
 
 
addListener
public void addListener(MagnetPluginListener listener)
 
 
removeListener
public void removeListener(MagnetPluginListener listener)