org.gudy.azureus2.ui.webplugin
Class WebPlugin
java.lang.Object
org.gudy.azureus2.ui.webplugin.WebPlugin
- All Implemented Interfaces:
- Plugin, TrackerWebPageGenerator
- Direct Known Subclasses:
- RSSGeneratorPlugin
public class WebPlugin
- extends Object
- implements Plugin, TrackerWebPageGenerator
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PR_ENABLE
public static final String PR_ENABLE
- See Also:
- Constant Field Values
PR_DISABLABLE
public static final String PR_DISABLABLE
- See Also:
- Constant Field Values
PR_PORT
public static final String PR_PORT
- See Also:
- Constant Field Values
PR_BIND_IP
public static final String PR_BIND_IP
- See Also:
- Constant Field Values
PR_ROOT_RESOURCE
public static final String PR_ROOT_RESOURCE
- See Also:
- Constant Field Values
PR_HOME_PAGE
public static final String PR_HOME_PAGE
- See Also:
- Constant Field Values
PR_ROOT_DIR
public static final String PR_ROOT_DIR
- See Also:
- Constant Field Values
PR_ACCESS
public static final String PR_ACCESS
- See Also:
- Constant Field Values
PR_LOG
public static final String PR_LOG
- See Also:
- Constant Field Values
PR_CONFIG_MODEL_PARAMS
public static final String PR_CONFIG_MODEL_PARAMS
- See Also:
- Constant Field Values
PR_CONFIG_MODEL
public static final String PR_CONFIG_MODEL
- See Also:
- Constant Field Values
PR_VIEW_MODEL
public static final String PR_VIEW_MODEL
- See Also:
- Constant Field Values
PR_HIDE_RESOURCE_CONFIG
public static final String PR_HIDE_RESOURCE_CONFIG
- See Also:
- Constant Field Values
PR_ENABLE_KEEP_ALIVE
public static final String PR_ENABLE_KEEP_ALIVE
- See Also:
- Constant Field Values
PR_PAIRING_SID
public static final String PR_PAIRING_SID
- See Also:
- Constant Field Values
PR_NON_BLOCKING
public static final String PR_NON_BLOCKING
- See Also:
- Constant Field Values
PR_ENABLE_PAIRING
public static final String PR_ENABLE_PAIRING
- See Also:
- Constant Field Values
PR_ENABLE_I2P
public static final String PR_ENABLE_I2P
- See Also:
- Constant Field Values
PR_ENABLE_TOR
public static final String PR_ENABLE_TOR
- See Also:
- Constant Field Values
PR_ENABLE_UPNP
public static final String PR_ENABLE_UPNP
- See Also:
- Constant Field Values
PROPERTIES_MIGRATED
public static final String PROPERTIES_MIGRATED
- See Also:
- Constant Field Values
CONFIG_MIGRATED
public static final String CONFIG_MIGRATED
- See Also:
- Constant Field Values
PAIRING_MIGRATED
public static final String PAIRING_MIGRATED
- See Also:
- Constant Field Values
PAIRING_SESSION_KEY
public static final String PAIRING_SESSION_KEY
- See Also:
- Constant Field Values
CONFIG_PASSWORD_ENABLE
public static final String CONFIG_PASSWORD_ENABLE
- See Also:
- Constant Field Values
CONFIG_PASSWORD_ENABLE_DEFAULT
public static final boolean CONFIG_PASSWORD_ENABLE_DEFAULT
- See Also:
- Constant Field Values
CONFIG_PAIRING_ENABLE
public static final String CONFIG_PAIRING_ENABLE
- See Also:
- Constant Field Values
CONFIG_PAIRING_ENABLE_DEFAULT
public static final boolean CONFIG_PAIRING_ENABLE_DEFAULT
- See Also:
- Constant Field Values
CONFIG_PORT_OVERRIDE
public static final String CONFIG_PORT_OVERRIDE
- See Also:
- Constant Field Values
CONFIG_PAIRING_AUTO_AUTH
public static final String CONFIG_PAIRING_AUTO_AUTH
- See Also:
- Constant Field Values
CONFIG_PAIRING_AUTO_AUTH_DEFAULT
public static final boolean CONFIG_PAIRING_AUTO_AUTH_DEFAULT
- See Also:
- Constant Field Values
CONFIG_ENABLE
public static final String CONFIG_ENABLE
- See Also:
- Constant Field Values
CONFIG_ENABLE_DEFAULT
public boolean CONFIG_ENABLE_DEFAULT
CONFIG_USER
public static final String CONFIG_USER
- See Also:
- Constant Field Values
CONFIG_USER_DEFAULT
public static final String CONFIG_USER_DEFAULT
- See Also:
- Constant Field Values
CONFIG_PASSWORD
public static final String CONFIG_PASSWORD
- See Also:
- Constant Field Values
CONFIG_PASSWORD_DEFAULT
public static final byte[] CONFIG_PASSWORD_DEFAULT
CONFIG_PORT
public static final String CONFIG_PORT
- See Also:
- Constant Field Values
CONFIG_PORT_DEFAULT
public int CONFIG_PORT_DEFAULT
CONFIG_BIND_IP
public static final String CONFIG_BIND_IP
- See Also:
- Constant Field Values
CONFIG_BIND_IP_DEFAULT
public String CONFIG_BIND_IP_DEFAULT
CONFIG_PROTOCOL
public static final String CONFIG_PROTOCOL
- See Also:
- Constant Field Values
CONFIG_PROTOCOL_DEFAULT
public static final String CONFIG_PROTOCOL_DEFAULT
- See Also:
- Constant Field Values
CONFIG_UPNP_ENABLE
public static final String CONFIG_UPNP_ENABLE
- See Also:
- Constant Field Values
CONFIG_UPNP_ENABLE_DEFAULT
public boolean CONFIG_UPNP_ENABLE_DEFAULT
CONFIG_HOME_PAGE
public static final String CONFIG_HOME_PAGE
- See Also:
- Constant Field Values
CONFIG_HOME_PAGE_DEFAULT
public String CONFIG_HOME_PAGE_DEFAULT
CONFIG_ROOT_DIR
public static final String CONFIG_ROOT_DIR
- See Also:
- Constant Field Values
CONFIG_ROOT_DIR_DEFAULT
public String CONFIG_ROOT_DIR_DEFAULT
CONFIG_ROOT_RESOURCE
public static final String CONFIG_ROOT_RESOURCE
- See Also:
- Constant Field Values
CONFIG_ROOT_RESOURCE_DEFAULT
public String CONFIG_ROOT_RESOURCE_DEFAULT
CONFIG_MODE
public static final String CONFIG_MODE
- See Also:
- Constant Field Values
CONFIG_MODE_FULL
public static final String CONFIG_MODE_FULL
- See Also:
- Constant Field Values
CONFIG_MODE_DEFAULT
public static final String CONFIG_MODE_DEFAULT
- See Also:
- Constant Field Values
CONFIG_ACCESS
public static final String CONFIG_ACCESS
- See Also:
- Constant Field Values
CONFIG_ACCESS_DEFAULT
public String CONFIG_ACCESS_DEFAULT
NL
protected static final String NL
- See Also:
- Constant Field Values
welcome_pages
protected static final String[] welcome_pages
welcome_files
protected static File[] welcome_files
plugin_interface
protected PluginInterface plugin_interface
WebPlugin
public WebPlugin()
WebPlugin
public WebPlugin(Properties defaults)
initialize
public void initialize(PluginInterface _plugin_interface)
throws PluginException
- 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
- Throws:
PluginException
initStage
protected void initStage(int num)
isPluginEnabled
protected boolean isPluginEnabled()
unloadPlugin
protected void unloadPlugin()
setupServer
protected void setupServer()
setupUPnP
protected void setupUPnP()
setupPairing
protected void setupPairing(String sid,
boolean pairing_enabled)
setupAutoAuth
protected void setupAutoAuth()
updatePairing
protected void updatePairing(String sid)
updatePairing
protected void updatePairing(PairingConnectionData cd)
getServerBindIP
public InetAddress getServerBindIP()
getServerPort
public int getServerPort()
getPort
public int getPort()
getProtocol
public String getProtocol()
setUserAndPassword
public void setUserAndPassword(String user,
String password)
unsetUserAndPassword
public void unsetUserAndPassword()
generateSupport
public boolean generateSupport(TrackerWebPageRequest request,
TrackerWebPageResponse response)
throws IOException
- Throws:
IOException
generate
public boolean generate(TrackerWebPageRequest request,
TrackerWebPageResponse response)
throws IOException
- Specified by:
generate
in interface TrackerWebPageGenerator
- Returns:
- true if the request was handled
- Throws:
IOException
useFile
protected boolean useFile(TrackerWebPageRequest request,
TrackerWebPageResponse response,
String root,
String relative_url)
throws IOException
- this method can be over-ridden to handle custom file delivery
- Parameters:
request
- response
- root
- relative_url
-
- Returns:
-
- Throws:
IOException
getConfigModel
protected BasicPluginConfigModel getConfigModel()
getViewModel
protected BasicPluginViewModel getViewModel()
log
protected void log(String str)
log
protected void log(String str,
Throwable e)