com.aelitis.azureus.plugins.magnet
Class MagnetPlugin

java.lang.Object
  extended by com.aelitis.azureus.plugins.magnet.MagnetPlugin
All Implemented Interfaces:
Plugin

public class MagnetPlugin
extends java.lang.Object
implements Plugin

Author:
parg

Field Summary
static int FL_DISABLE_MD_LOOKUP
           
static int FL_NONE
           
 
Constructor Summary
MagnetPlugin()
           
 
Method Summary
 void addListener(MagnetPluginListener listener)
           
 byte[] badge()
           
protected  void doSecondaryLookup(MagnetPluginProgressListener listener, java.lang.Object[] result, byte[] hash, java.util.Set<java.lang.String> networks_enabled, java.lang.String args)
           
 byte[] download(MagnetPluginProgressListener listener, byte[] hash, java.lang.String args, java.net.InetSocketAddress[] sources, long timeout, int flags)
           
 java.net.URL getMagnetURL(byte[] hash)
           
 java.net.URL getMagnetURL(Download d)
           
protected  java.lang.String getMessageText(java.lang.String resource, java.lang.String... params)
           
protected  byte[] getSecondaryLookupResult(java.lang.Object[] result)
           
 void initialize(PluginInterface _plugin_interface)
          This method is called when the Plugin is loaded by Azureus
 boolean isNetworkEnabled(java.lang.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
 

Field Detail

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
Constructor Detail

MagnetPlugin

public MagnetPlugin()
Method Detail

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(java.lang.String net)

getMagnetURL

public java.net.URL getMagnetURL(Download d)

getMagnetURL

public java.net.URL getMagnetURL(byte[] hash)

badge

public byte[] badge()

download

public byte[] download(MagnetPluginProgressListener listener,
                       byte[] hash,
                       java.lang.String args,
                       java.net.InetSocketAddress[] sources,
                       long timeout,
                       int flags)
                throws MagnetURIHandlerException
Throws:
MagnetURIHandlerException

doSecondaryLookup

protected void doSecondaryLookup(MagnetPluginProgressListener listener,
                                 java.lang.Object[] result,
                                 byte[] hash,
                                 java.util.Set<java.lang.String> networks_enabled,
                                 java.lang.String args)

getSecondaryLookupResult

protected byte[] getSecondaryLookupResult(java.lang.Object[] result)
                                   throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getMessageText

protected java.lang.String getMessageText(java.lang.String resource,
                                          java.lang.String... params)

addListener

public void addListener(MagnetPluginListener listener)

removeListener

public void removeListener(MagnetPluginListener listener)