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 java.lang.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 java.lang.String PR_ENABLE
- See Also:
- Constant Field Values
PR_DISABLABLE
public static final java.lang.String PR_DISABLABLE
- See Also:
- Constant Field Values
PR_PORT
public static final java.lang.String PR_PORT
- See Also:
- Constant Field Values
PR_BIND_IP
public static final java.lang.String PR_BIND_IP
- See Also:
- Constant Field Values
PR_ROOT_RESOURCE
public static final java.lang.String PR_ROOT_RESOURCE
- See Also:
- Constant Field Values
PR_HOME_PAGE
public static final java.lang.String PR_HOME_PAGE
- See Also:
- Constant Field Values
PR_ROOT_DIR
public static final java.lang.String PR_ROOT_DIR
- See Also:
- Constant Field Values
PR_ACCESS
public static final java.lang.String PR_ACCESS
- See Also:
- Constant Field Values
PR_LOG
public static final java.lang.String PR_LOG
- See Also:
- Constant Field Values
PR_CONFIG_MODEL_PARAMS
public static final java.lang.String PR_CONFIG_MODEL_PARAMS
- See Also:
- Constant Field Values
PR_CONFIG_MODEL
public static final java.lang.String PR_CONFIG_MODEL
- See Also:
- Constant Field Values
PR_VIEW_MODEL
public static final java.lang.String PR_VIEW_MODEL
- See Also:
- Constant Field Values
PR_HIDE_RESOURCE_CONFIG
public static final java.lang.String PR_HIDE_RESOURCE_CONFIG
- See Also:
- Constant Field Values
PR_ENABLE_KEEP_ALIVE
public static final java.lang.String PR_ENABLE_KEEP_ALIVE
- See Also:
- Constant Field Values
PR_PAIRING_SID
public static final java.lang.String PR_PAIRING_SID
- See Also:
- Constant Field Values
PR_NON_BLOCKING
public static final java.lang.String PR_NON_BLOCKING
- See Also:
- Constant Field Values
PR_ENABLE_PAIRING
public static final java.lang.String PR_ENABLE_PAIRING
- See Also:
- Constant Field Values
PR_ENABLE_I2P
public static final java.lang.String PR_ENABLE_I2P
- See Also:
- Constant Field Values
PR_ENABLE_TOR
public static final java.lang.String PR_ENABLE_TOR
- See Also:
- Constant Field Values
PR_ENABLE_UPNP
public static final java.lang.String PR_ENABLE_UPNP
- See Also:
- Constant Field Values
PROPERTIES_MIGRATED
public static final java.lang.String PROPERTIES_MIGRATED
- See Also:
- Constant Field Values
CONFIG_MIGRATED
public static final java.lang.String CONFIG_MIGRATED
- See Also:
- Constant Field Values
PAIRING_MIGRATED
public static final java.lang.String PAIRING_MIGRATED
- See Also:
- Constant Field Values
PAIRING_SESSION_KEY
public static final java.lang.String PAIRING_SESSION_KEY
- See Also:
- Constant Field Values
CONFIG_PASSWORD_ENABLE
public static final java.lang.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 java.lang.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 java.lang.String CONFIG_PORT_OVERRIDE
- See Also:
- Constant Field Values
CONFIG_PAIRING_AUTO_AUTH
public static final java.lang.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 java.lang.String CONFIG_ENABLE
- See Also:
- Constant Field Values
CONFIG_ENABLE_DEFAULT
public boolean CONFIG_ENABLE_DEFAULT
CONFIG_USER
public static final java.lang.String CONFIG_USER
- See Also:
- Constant Field Values
CONFIG_USER_DEFAULT
public static final java.lang.String CONFIG_USER_DEFAULT
- See Also:
- Constant Field Values
CONFIG_PASSWORD
public static final java.lang.String CONFIG_PASSWORD
- See Also:
- Constant Field Values
CONFIG_PASSWORD_DEFAULT
public static final byte[] CONFIG_PASSWORD_DEFAULT
CONFIG_PORT
public static final java.lang.String CONFIG_PORT
- See Also:
- Constant Field Values
CONFIG_PORT_DEFAULT
public int CONFIG_PORT_DEFAULT
CONFIG_BIND_IP
public static final java.lang.String CONFIG_BIND_IP
- See Also:
- Constant Field Values
CONFIG_BIND_IP_DEFAULT
public java.lang.String CONFIG_BIND_IP_DEFAULT
CONFIG_PROTOCOL
public static final java.lang.String CONFIG_PROTOCOL
- See Also:
- Constant Field Values
CONFIG_PROTOCOL_DEFAULT
public static final java.lang.String CONFIG_PROTOCOL_DEFAULT
- See Also:
- Constant Field Values
CONFIG_UPNP_ENABLE
public static final java.lang.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 java.lang.String CONFIG_HOME_PAGE
- See Also:
- Constant Field Values
CONFIG_HOME_PAGE_DEFAULT
public java.lang.String CONFIG_HOME_PAGE_DEFAULT
CONFIG_ROOT_DIR
public static final java.lang.String CONFIG_ROOT_DIR
- See Also:
- Constant Field Values
CONFIG_ROOT_DIR_DEFAULT
public java.lang.String CONFIG_ROOT_DIR_DEFAULT
CONFIG_ROOT_RESOURCE
public static final java.lang.String CONFIG_ROOT_RESOURCE
- See Also:
- Constant Field Values
CONFIG_ROOT_RESOURCE_DEFAULT
public java.lang.String CONFIG_ROOT_RESOURCE_DEFAULT
CONFIG_MODE
public static final java.lang.String CONFIG_MODE
- See Also:
- Constant Field Values
CONFIG_MODE_FULL
public static final java.lang.String CONFIG_MODE_FULL
- See Also:
- Constant Field Values
CONFIG_MODE_DEFAULT
public static final java.lang.String CONFIG_MODE_DEFAULT
- See Also:
- Constant Field Values
CONFIG_ACCESS
public static final java.lang.String CONFIG_ACCESS
- See Also:
- Constant Field Values
CONFIG_ACCESS_DEFAULT
public java.lang.String CONFIG_ACCESS_DEFAULT
NL
protected static final java.lang.String NL
- See Also:
- Constant Field Values
welcome_pages
protected static final java.lang.String[] welcome_pages
welcome_files
protected static java.io.File[] welcome_files
plugin_interface
protected PluginInterface plugin_interface
WebPlugin
public WebPlugin()
WebPlugin
public WebPlugin(java.util.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(java.lang.String sid,
boolean pairing_enabled)
setupAutoAuth
protected void setupAutoAuth()
updatePairing
protected void updatePairing(java.lang.String sid)
updatePairing
protected void updatePairing(PairingConnectionData cd)
getServerBindIP
public java.net.InetAddress getServerBindIP()
getServerPort
public int getServerPort()
getPort
public int getPort()
getProtocol
public java.lang.String getProtocol()
setUserAndPassword
public void setUserAndPassword(java.lang.String user,
java.lang.String password)
unsetUserAndPassword
public void unsetUserAndPassword()
generateSupport
public boolean generateSupport(TrackerWebPageRequest request,
TrackerWebPageResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
generate
public boolean generate(TrackerWebPageRequest request,
TrackerWebPageResponse response)
throws java.io.IOException
- Specified by:
generate
in interface TrackerWebPageGenerator
- Returns:
- true if the request was handled
- Throws:
java.io.IOException
useFile
protected boolean useFile(TrackerWebPageRequest request,
TrackerWebPageResponse response,
java.lang.String root,
java.lang.String relative_url)
throws java.io.IOException
- this method can be over-ridden to handle custom file delivery
- Parameters:
request
- response
- root
- relative_url
-
- Returns:
-
- Throws:
java.io.IOException
getConfigModel
protected BasicPluginConfigModel getConfigModel()
getViewModel
protected BasicPluginViewModel getViewModel()
log
protected void log(java.lang.String str)
log
protected void log(java.lang.String str,
java.lang.Throwable e)