FileDocCategorySizeDatePackage
Test.javaAPI DocAzureus 3.0.3.42984Thu Feb 09 19:42:54 GMT 2006org.gudy.azureus2.pluginsimpl.local.update

Test

public class Test extends Object implements org.gudy.azureus2.plugins.Plugin, org.gudy.azureus2.plugins.PluginListener
author
parg

Fields Summary
protected org.gudy.azureus2.plugins.PluginManager
manager
Constructors Summary
public Test()

		// constructor for Plugin
	
public Test(boolean ignore)

		Properties props = new Properties();
		
		props.put( PluginManager.PR_MULTI_INSTANCE, "true" );
		
		PluginManager.registerPlugin( Test.class );
	
		PluginManager.startAzureus( PluginManager.UI_SWT, props );
	
Methods Summary
public voidclosedownComplete()

		
	
public voidclosedownInitiated()

		
	
public voidinitializationComplete()

		new AEThread("update tester" )
		{
			public void
			runSupport()
			{	
				try{
	
					UpdateManager	update_man = manager.getDefaultPluginInterface().getUpdateManager();
					
					UpdateInstaller installer = update_man.createInstaller();
					
					File	from_file 	= new File( "C:\\temp\\update_from" );
					File	to_file		= new File( "C:\\temp\\update_to" );
					
					PrintWriter pw = new PrintWriter( new FileWriter( from_file ));
					
					pw.println( "hello mum");
					
					pw.close();
					
					to_file.delete();
					
					installer.addMoveAction( from_file.toString(), to_file.toString());
					
					update_man.applyUpdates( false );
					
				}catch( Throwable e ){
					
					e.printStackTrace();
				}
			}
		}.start();
	
public voidinitialize(org.gudy.azureus2.plugins.PluginInterface pi)

		manager	= pi.getPluginManager();
		
		pi.addListener( this );
	
public static voidmain(java.lang.String[] args)

		new Test(true);