Methods Summary |
---|
public RPReply | _process(RPRequest request)
String method = request.getMethod();
if ( method.equals( "initialize")){
try{
delegate.initialize();
}catch( DownloadException e ){
return( new RPReply(e));
}
return( null );
}else if ( method.equals( "start")){
try{
delegate.start();
}catch( DownloadException e ){
return( new RPReply(e));
}
return( null );
}else if ( method.equals( "restart")){
try{
delegate.restart();
}catch( DownloadException e ){
return( new RPReply(e));
}
return( null );
}else if ( method.equals( "stop")){
try{
delegate.stop();
}catch( DownloadException e ){
return( new RPReply(e));
}
return( null );
}else if ( method.equals( "remove")){
try{
delegate.remove();
}catch( Throwable e ){
return( new RPReply(e));
}
return( null );
}else if ( method.equals( "setForceStart[boolean]")){
boolean b = ((Boolean)request.getParams()[0]).booleanValue();
delegate.setForceStart( b );
return( null );
}else if ( method.equals( "setPosition[int]")){
int p = ((Integer)request.getParams()[0]).intValue();
delegate.setPosition( p );
return( null );
}else if ( method.equals( "moveUp")){
delegate.moveUp();
return( null );
}else if ( method.equals( "moveDown")){
delegate.moveDown();
return( null );
}else if ( method.equals( "moveTo[int]")){
int p = ((Integer)request.getParams()[0]).intValue();
delegate.setPosition( p );
return( null );
}else if ( method.equals( "setPriority[int]")){
delegate.setPriority(((Integer)request.getParams()[0]).intValue());
return( null );
}else if ( method.equals( "requestTrackerAnnounce")){
delegate.requestTrackerAnnounce();
return( null );
}else if ( method.equals( "getDiskManagerFileInfo")){
DiskManagerFileInfo[] info = delegate.getDiskManagerFileInfo();
RPDiskManagerFileInfo[] rp_info = new RPDiskManagerFileInfo[info.length];
for (int i=0;i<rp_info.length;i++){
rp_info[i] = RPDiskManagerFileInfo.create( info[i] );
}
return( new RPReply( rp_info ));
}
throw( new RPException( "Unknown method: " + method ));
|
protected void | _setDelegate(java.lang.Object _delegate)
delegate = (Download)_delegate;
position = delegate.getPosition();
force_start = delegate.isForceStart();
|
public java.lang.Object | _setLocal()
Object res = _fixupLocal();
if ( torrent != null ){
torrent._setLocal();
}
stats._setLocal();
announce_result._setLocal();
scrape_result._setLocal();
return( res );
|
public void | _setRemote(RPRequestDispatcher dispatcher)
super._setRemote( dispatcher );
if ( torrent != null ){
torrent._setRemote( dispatcher );
}
stats._setRemote( dispatcher );
announce_result._setRemote( dispatcher );
scrape_result._setRemote( dispatcher );
|
public void | addActivationListener(DownloadActivationListener l)
notSupported();
|
public void | addDownloadWillBeRemovedListener(DownloadWillBeRemovedListener l)
notSupported();
|
public void | addListener(DownloadListener l)
notSupported();
|
public void | addListener(DownloadPeerListener l)
notSupported(l);
|
public void | addPeerListener(DownloadPeerListener l)
notSupported();
|
public void | addPropertyListener(DownloadPropertyListener l)
notSupported();
|
public void | addTrackerListener(DownloadTrackerListener l)
notSupported();
|
public void | addTrackerListener(DownloadTrackerListener l, boolean immediateTrigger)
notSupported();
|
public java.io.File[] | calculateDefaultPaths(boolean for_moving)
notSupported();
return null;
|
public boolean | canBeRemoved()
notSupported();
return( false );
|
public static org.gudy.azureus2.pluginsimpl.remote.download.RPDownload | create(Download _delegate)
RPDownload res =(RPDownload)_lookupLocal( _delegate );
if ( res == null ){
res = new RPDownload( _delegate );
}
return( res );
|
public DownloadActivationEvent | getActivationState()
notSupported();
return( null );
|
public java.lang.String | getAttribute(TorrentAttribute attribute)
notSupported();
return (null);
|
public boolean | getBooleanAttribute(TorrentAttribute ta)notSupported(); return false;
|
public java.lang.String | getCategoryName()
notSupported();
return ("");
|
public long | getCreationTime()
notSupported();
return( 0 );
|
public org.gudy.azureus2.plugins.disk.DiskManager | getDiskManager()
notSupported();
return( null );
|
public org.gudy.azureus2.plugins.disk.DiskManagerFileInfo[] | getDiskManagerFileInfo()
RPDiskManagerFileInfo[] resp = (RPDiskManagerFileInfo[])_dispatcher.dispatch(
new RPRequest(
this,
"getDiskManagerFileInfo",
null)).getResponse();
for (int i=0;i<resp.length;i++){
resp[i]._setRemote( _dispatcher );
}
return( resp );
|
public byte[] | getDownloadPeerId()
return delegate.getDownloadPeerId();
|
public int | getDownloadRateLimitBytesPerSecond()
notSupported();
return 0;
|
public java.lang.String | getErrorStateDetails()
notSupported();
return( null );
|
public boolean | getFlag(long flag)
notSupported();
return( false );
|
public int | getIndex()
notSupported();
return( 0 );
|
public int | getIntAttribute(TorrentAttribute ta)notSupported(); return 0;
|
public DownloadAnnounceResult | getLastAnnounceResult()
return( announce_result );
|
public DownloadScrapeResult | getLastScrapeResult()
return( scrape_result );
|
public java.lang.String[] | getListAttribute(TorrentAttribute attribute)
notSupported();
return (null);
|
public long | getLongAttribute(TorrentAttribute ta)notSupported(); return 0L;
|
public java.util.Map | getMapAttribute(TorrentAttribute attribute)
notSupported();
return( null );
|
public int | getMaximumDownloadKBPerSecond()
notSupported();
return(0);
|
public java.lang.String | getName()
notSupported();
return ("");
|
public org.gudy.azureus2.plugins.peers.PeerManager | getPeerManager()
notSupported();
return( null );
|
public int | getPosition()
return( position );
|
public int | getPriority()
//do nothing deprecated
return 0;
|
public java.lang.String | getSavePath()
notSupported();
return( null );
|
public int | getSeedingRank()
notSupported();
return( 0 );
|
public int | getState()
notSupported();
return(0);
|
public DownloadStats | getStats()
return( stats );
|
public int | getSubState()
notSupported();
return(0);
|
public Torrent | getTorrent()
return( torrent );
|
public java.lang.String | getTorrentFileName()
notSupported();
return ("");
|
public int | getUploadRateLimitBytesPerSecond()
notSupported();
return 0;
|
public boolean | hasAttribute(TorrentAttribute ta)notSupported(); return false;
|
public void | initialize()
try{
_dispatcher.dispatch( new RPRequest( this, "initialize", null )).getResponse();
}catch( RPException e ){
if ( e.getCause() instanceof DownloadException ){
throw((DownloadException)e.getCause());
}
throw( e );
}
|
public boolean | isChecking()
notSupported();
return( false );
|
public boolean | isComplete()
notSupported();
return( false );
|
public boolean | isComplete(boolean b)
notSupported();
return( false );
|
public boolean | isForceStart()
return( force_start );
|
public boolean | isInDefaultSaveDir()notSupported(); return false;
|
public boolean | isMessagingEnabled() return delegate.isMessagingEnabled();
|
public boolean | isPaused()
notSupported();
return( false );
|
public boolean | isPersistent()
notSupported();
return false;
|
public boolean | isPriorityLocked()
// Do nothing, deprecated
return( false );
|
public boolean | isStartStopLocked()
notSupported();
return( false );
|
public void | moveDataFiles(java.io.File new_parent_dir)
notSupported();
|
public void | moveDataFiles(java.io.File new_parent_dir, java.lang.String new_name)
notSupported();
|
public void | moveDown()
_dispatcher.dispatch( new RPRequest( this, "moveDown", null)).getResponse();
|
public void | moveTo(int position)
_dispatcher.dispatch( new RPRequest( this, "moveTo[int]", new Object[]{new Integer(position )})).getResponse();
|
public void | moveTorrentFile(java.io.File new_parent_dir)
notSupported();
|
public void | moveUp()
_dispatcher.dispatch( new RPRequest( this, "moveUp", null)).getResponse();
|
public void | pause()
notSupported();
|
public void | recheckData()
notSupported();
|
public void | remove()
try{
_dispatcher.dispatch( new RPRequest( this, "remove", null )).getResponse();
}catch( RPException e ){
Throwable cause = e.getCause();
if ( cause instanceof DownloadException ){
throw((DownloadException)cause);
}
if ( cause instanceof DownloadRemovalVetoException ){
throw((DownloadRemovalVetoException)cause);
}
throw( e );
}
|
public void | remove(boolean delete_torrent, boolean delete_data)
notSupported();
|
public void | removeActivationListener(DownloadActivationListener l)
notSupported();
|
public void | removeDownloadWillBeRemovedListener(DownloadWillBeRemovedListener l)
notSupported();
|
public void | removeListener(DownloadListener l)
notSupported();
|
public void | removeListener(DownloadPeerListener l)
notSupported(l);
|
public void | removePeerListener(DownloadPeerListener l)
notSupported();
|
public void | removePropertyListener(DownloadPropertyListener l)
notSupported();
|
public void | removeTrackerListener(DownloadTrackerListener l)
notSupported();
|
public void | renameDownload(java.lang.String new_name)
notSupported();
|
public void | requestTrackerAnnounce()
_dispatcher.dispatch( new RPRequest( this, "requestTrackerAnnounce", null)).getResponse();
|
public void | requestTrackerAnnounce(boolean immediate)
notSupported();
|
public void | requestTrackerScrape(boolean immediate)
notSupported();
|
public void | restart()
try{
_dispatcher.dispatch( new RPRequest( this, "restart", null )).getResponse();
}catch( RPException e ){
if ( e.getCause() instanceof DownloadException ){
throw((DownloadException)e.getCause());
}
throw( e );
}
|
public void | resume()
notSupported();
|
public void | setAnnounceResult(DownloadAnnounceResult result)
notSupported();
|
public void | setAttribute(TorrentAttribute attribute, java.lang.String value)
notSupported();
|
public void | setBooleanAttribute(TorrentAttribute ta, boolean value)notSupported();
|
public void | setCategory(java.lang.String sName)
notSupported();
|
public void | setDownloadRateLimitBytesPerSecond(int max_rate_bps)
notSupported();
|
public void | setFlag(long flag, boolean set)notSupported();
|
public void | setForceStart(boolean _force_start)
force_start = _force_start;
_dispatcher.dispatch( new RPRequest( this, "setForceStart[boolean]", new Object[]{new Boolean(force_start )})).getResponse();
|
public void | setIntAttribute(TorrentAttribute ta, int value)notSupported();
|
public void | setListAttribute(TorrentAttribute ta, java.lang.String[] value)notSupported();
|
public void | setLongAttribute(TorrentAttribute ta, long value)notSupported();
|
public void | setMapAttribute(TorrentAttribute attribute, java.util.Map value)
notSupported();
|
public void | setMaximumDownloadKBPerSecond(int kb)
notSupported();
|
public void | setMessagingEnabled(boolean enabled)
delegate.setMessagingEnabled( enabled );
|
public void | setPosition(int new_position)
_dispatcher.dispatch( new RPRequest( this, "setPosition[int]", new Object[]{new Integer(new_position )})).getResponse();
|
public void | setPriority(int priority)
//Do nothing, deprecated
|
public void | setScrapeResult(DownloadScrapeResult result)
notSupported();
|
public void | setSeedingRank(int rank)
// TODO Auto-generated method stub
|
public void | setSessionAuthenticator(org.gudy.azureus2.plugins.download.session.SessionAuthenticator auth)
notSupported(); //TODO ?
|
public void | setUploadRateLimitBytesPerSecond(int max_rate_bps) notSupported();
|
public void | start()
try{
_dispatcher.dispatch( new RPRequest( this, "start", null )).getResponse();
}catch( RPException e ){
if ( e.getCause() instanceof DownloadException ){
throw((DownloadException)e.getCause());
}
throw( e );
}
|
public void | stop()
try{
_dispatcher.dispatch( new RPRequest( this, "stop", null )).getResponse();
}catch( RPException e ){
if ( e.getCause() instanceof DownloadException ){
throw((DownloadException)e.getCause());
}
throw( e );
}
|
public void | stopAndQueue()
notSupported();
|