Methods Summary |
---|
public void | closedownComplete()
|
public void | closedownInitiated()
|
public static org.gudy.azureus2.ui.jws.Main | getSingleton(java.lang.String[] args)
try{
class_mon.enter();
if ( singleton == null ){
new AEThread( "plugin initialiser ")
{
public void
runSupport()
{
PluginManager.registerPlugin( Main.class );
Properties props = new Properties();
props.put( PluginManager.PR_MULTI_INSTANCE, "false" );
PluginManager.startAzureus( PluginManager.UI_SWT, props );
}
}.start();
init_sem.reserve();
}
return( singleton );
}finally{
class_mon.exit();
}
|
public void | handleEvent(PluginEvent ev)
System.out.println( "PluginEvent:" + ev.getType());
if ( ev.getType() == PluginEvent.PEV_CONFIGURATION_WIZARD_COMPLETES ){
ready_sem.release();
}
|
public void | initializationComplete()
|
public void | initialize(PluginInterface _pi)
plugin_interface = _pi;
singleton = this;
log = plugin_interface.getLogger().getChannel("JWS Launcher");
log.addListener(
new LoggerChannelListener()
{
public void
messageLogged(
int type,
String content )
{
System.out.println( content );
}
public void
messageLogged(
String str,
Throwable error )
{
System.out.println( str );
Debug.printStackTrace( error );
}
});
log.log(LoggerChannel.LT_INFORMATION, "Plugin Initialised");
plugin_interface.addListener( this );
plugin_interface.addEventListener( this );
init_sem.release();
|
public static void | main(java.lang.String[] args)
getSingleton( args ).process();
|
protected void | process()
ready_sem.reserve();
log.log(LoggerChannel.LT_INFORMATION, "processing jws request" );
Properties props = System.getProperties();
Enumeration enumx = props.keys();
while( enumx.hasMoreElements()){
String key = (String)enumx.nextElement();
log.log(LoggerChannel.LT_INFORMATION, "\t" + key + " = '" + props.get(key) + "'");
}
String torrent_url = (String)props.get( "azureus.javaws.torrent_url");
log.log(LoggerChannel.LT_INFORMATION, "Torrent URL = " + torrent_url );
if ( torrent_url != null ){
try{
plugin_interface.getDownloadManager().addDownload(new URL(torrent_url));
}catch( Throwable e ){
log.log( e );
}
}
|