Methods Summary |
---|
public RPReply | _process(RPRequest request)
String method = request.getMethod();
Object[] params = request.getParams();
if ( method.equals( "host[Torrent,boolean]")){
try{
Torrent torrent = params[0]==null?null:(Torrent)((RPTorrent)params[0])._setLocal();
if ( torrent == null ){
throw( new RPException( "Invalid torrent" ));
}
TrackerTorrent tt = delegate.host(torrent,((Boolean)params[1]).booleanValue());
RPTrackerTorrent res = RPTrackerTorrent.create( tt );
return( new RPReply( res ));
}catch( TrackerException e ){
return( new RPReply( e ));
}
}else if ( method.equals( "getTorrents")){
TrackerTorrent[] torrents = delegate.getTorrents();
RPTrackerTorrent[] res = new RPTrackerTorrent[torrents.length];
for (int i=0;i<res.length;i++){
res[i] = RPTrackerTorrent.create( torrents[i]);
}
return( new RPReply( res ));
}
throw( new RPException( "Unknown method: " + method ));
|
protected void | _setDelegate(java.lang.Object _delegate)
delegate = (Tracker)_delegate;
|
public java.lang.Object | _setLocal()
return( _fixupLocal());
|
public void | addAuthenticationListener(TrackerAuthenticationListener l)
|
public void | addListener(TrackerListener listener)
|
public void | addPageGenerator(TrackerWebPageGenerator generator)
|
public static org.gudy.azureus2.pluginsimpl.remote.tracker.RPTracker | create(Tracker _delegate)
RPTracker res =(RPTracker)_lookupLocal( _delegate );
if ( res == null ){
res = new RPTracker( _delegate );
}
return( res );
|
public TrackerWebContext | createWebContext(int port, int protocol)
notSupported();
return( null );
|
public TrackerWebContext | createWebContext(java.lang.String name, int port, int protocol)
notSupported();
return( null );
|
public TrackerWebContext | createWebContext(java.lang.String name, int port, int protocol, java.net.InetAddress bind_ip)
notSupported();
return( null );
|
public void | destroy()
notSupported();
|
public java.lang.String | getName()
notSupported();
return( null );
|
public TrackerWebPageGenerator[] | getPageGenerators()
notSupported();
return( null );
|
public TrackerTorrent | getTorrent(org.gudy.azureus2.plugins.torrent.Torrent t)
notSupported();
return( null );
|
public TrackerTorrent[] | getTorrents()
RPTrackerTorrent[] res = (RPTrackerTorrent[])_dispatcher.dispatch( new RPRequest( this, "getTorrents", null )).getResponse();
for (int i=0;i<res.length;i++){
res[i]._setRemote( _dispatcher );
}
return( res );
|
public java.net.URL[] | getURLs()
notSupported();
return( null );
|
public TrackerTorrent | host(org.gudy.azureus2.plugins.torrent.Torrent torrent, boolean persistent)
try{
RPTrackerTorrent resp = (RPTrackerTorrent)_dispatcher.dispatch( new RPRequest( this, "host[Torrent,boolean]", new Object[]{torrent, new Boolean(persistent)})).getResponse();
resp._setRemote( _dispatcher );
return( resp );
}catch( RPException e ){
if ( e.getCause() instanceof TrackerException ){
throw((TrackerException)e.getCause());
}
throw( e );
}
|
public TrackerTorrent | host(org.gudy.azureus2.plugins.torrent.Torrent torrent, boolean persistent, boolean passive)
notSupported();
return( null );
|
public TrackerTorrent | publish(org.gudy.azureus2.plugins.torrent.Torrent torrent)
notSupported();
return( null );
|
public void | removeAuthenticationListener(TrackerAuthenticationListener l)
|
public void | removeListener(TrackerListener listener)
|
public void | removePageGenerator(TrackerWebPageGenerator generator)
|