scraper = _scraper;
try{ class_mon.enter(); if ( singleton == null ){ singleton = new TRTrackerDHTScraperImpl( _scraper ); } return( singleton ); }finally{ class_mon.exit(); }
try{ responses.remove( torrent.getHashWrapper()); }catch( TOTorrentException e ){ Debug.printStackTrace(e); }
if ( torrent != null ){ try{ return((TRTrackerScraperResponse)responses.get( torrent.getHashWrapper())); }catch( TOTorrentException e ){ Debug.printStackTrace(e); } } return( null );
TOTorrent torrent = tracker_client.getTorrent(); if ( torrent != null ){ try{ return((TRTrackerScraperResponse)responses.get( torrent.getHashWrapper())); }catch( TOTorrentException e ){ Debug.printStackTrace(e); } } return( null );
if ( torrent != null && result != null){ try{ TRTrackerScraperResponseImpl resp = new TRTrackerDHTScraperResponseImpl( torrent.getHashWrapper(), result.getURL()); resp.setSeedsPeers( result.getSeedCount(), result.getNonSeedCount()); resp.setScrapeStartTime( result.getScrapeStartTime()); resp.setNextScrapeStartTime( result.getNextScrapeStartTime()); resp.setStatus( result.getResponseType()==DownloadScrapeResult.RT_SUCCESS? TRTrackerScraperResponse.ST_ONLINE: TRTrackerScraperResponse.ST_ERROR, result.getStatus()); responses.put( torrent.getHashWrapper(), resp ); scraper.scrapeReceived( resp ); }catch( TOTorrentException e ){ Debug.printStackTrace(e); } }