FileDocCategorySizeDatePackage
RPTorrentManager.javaAPI DocAzureus 3.0.3.46181Mon Mar 26 14:39:54 BST 2007org.gudy.azureus2.pluginsimpl.remote.torrent

RPTorrentManager

public class RPTorrentManager extends RPObject implements TorrentManager
author
parg

Fields Summary
protected transient TorrentManager
delegate
Constructors Summary
protected RPTorrentManager(TorrentManager _delegate)

		super( _delegate );
	
Methods Summary
public RPReply_process(RPRequest request)

		String		method 	= request.getMethod();
		Object[]	params	= request.getParams();

		if ( method.equals( "getURLDownloader[URL]")){

			try{
				TorrentDownloader dl = delegate.getURLDownloader((URL)params[0]);

				RPTorrentDownloader res = RPTorrentDownloader.create( dl );

				return( new RPReply( res ));

			}catch( TorrentException e ){

				return( new RPReply( e ));
			}
		}else if ( method.equals( "getURLDownloader[URL,String,String]")){

			try{
				TorrentDownloader dl = delegate.getURLDownloader((URL)params[0],(String)params[1],(String)params[2]);

				RPTorrentDownloader res = RPTorrentDownloader.create( dl );

				return( new RPReply( res ));

			}catch( TorrentException e ){

				return( new RPReply( e ));
			}
		}else if ( method.equals( "createFromBEncodedData[byte[]]")){

			try{
				return( new RPReply( RPTorrent.create( delegate.createFromBEncodedData((byte[])params[0]))));

			}catch( TorrentException e ){

				return( new RPReply(e));
			}
		}

		throw( new RPException( "Unknown method: " + method ));
	
protected void_setDelegate(java.lang.Object _delegate)

		delegate = (TorrentManager)_delegate;
	
public java.lang.Object_setLocal()

		return( _fixupLocal());
	
public voidaddListener(TorrentManagerListener l)

		notSupported();
	
public static org.gudy.azureus2.pluginsimpl.remote.torrent.RPTorrentManagercreate(TorrentManager _delegate)

		RPTorrentManager	res =(RPTorrentManager)_lookupLocal( _delegate );

		if ( res == null ){

			res = new RPTorrentManager( _delegate );
		}

		return( res );
	
public TorrentcreateFromBEncodedData(byte[] data)

		try{
			RPTorrent	res = (RPTorrent)_dispatcher.dispatch( new RPRequest( this, "createFromBEncodedData[byte[]]", new Object[]{data})).getResponse();

			res._setRemote( _dispatcher );

			return( res );

		}catch( RPException e ){

			if ( e.getCause() instanceof TorrentException ){

				throw((TorrentException)e.getCause());
			}

			throw( e );
		}
	
public TorrentcreateFromBEncodedData(byte[] data, int preserve)


		notSupported();

		return( null );
	
public TorrentcreateFromBEncodedFile(java.io.File file, int preserve)


		notSupported();

		return( null );
	
public TorrentcreateFromBEncodedFile(java.io.File file)

		notSupported();

		return( null );
	
public TorrentcreateFromBEncodedFile(java.io.File file, boolean for_seeding)

		notSupported();

		return( null );
	
public TorrentcreateFromBEncodedInputStream(java.io.InputStream data)

		notSupported();

		return( null );
	
public TorrentcreateFromBEncodedInputStream(java.io.InputStream data, int preserve)


		notSupported();

		return( null );
	
public TorrentcreateFromDataFile(java.io.File data, java.net.URL announce_url)

		notSupported();

		return( null );
	
public TorrentcreateFromDataFile(java.io.File data, java.net.URL announce_url, boolean include_other_hashes)

		notSupported();

		return( null );
	
public TorrentCreatorcreateFromDataFileEx(java.io.File data, java.net.URL announce_url, boolean include_other_hashes)

		notSupported();

		return( null );
	
public TorrentAttributegetAttribute(java.lang.String name)

		notSupported();

		return( null );
	
public TorrentAttribute[]getDefinedAttributes()

		notSupported();

		return( null );
	
public TorrentAttributegetPluginAttribute(java.lang.String name)

		notSupported();

		return( null );
	
public TorrentDownloadergetURLDownloader(java.net.URL url)

		try{
			RPTorrentDownloader resp = (RPTorrentDownloader)_dispatcher.dispatch( new RPRequest( this, "getURLDownloader[URL]", new Object[]{url})).getResponse();

			resp._setRemote( _dispatcher );

			return( resp );

		}catch( RPException e ){

			if ( e.getCause() instanceof TorrentException ){

				throw((TorrentException)e.getCause());
			}

			throw( e );
		}
	
public TorrentDownloadergetURLDownloader(java.net.URL url, java.lang.String user_name, java.lang.String password)

		try{
			RPTorrentDownloader resp = (RPTorrentDownloader)_dispatcher.dispatch( new RPRequest( this, "getURLDownloader[URL,String,String]", new Object[]{url, user_name, password})).getResponse();

			resp._setRemote( _dispatcher );

			return( resp );

		}catch( RPException e ){

			if ( e.getCause() instanceof TorrentException ){

				throw((TorrentException)e.getCause());
			}

			throw( e );
		}
	
public voidremoveListener(TorrentManagerListener l)

		notSupported();