FileDocCategorySizeDatePackage
DownloadScrapeResultImpl.javaAPI DocAzureus 3.0.3.43084Wed May 02 03:30:32 BST 2007org.gudy.azureus2.pluginsimpl.local.download

DownloadScrapeResultImpl

public class DownloadScrapeResultImpl extends Object implements org.gudy.azureus2.plugins.download.DownloadScrapeResult
author
parg

Fields Summary
protected DownloadImpl
download
protected TRTrackerScraperResponse
response
Constructors Summary
protected DownloadScrapeResultImpl(DownloadImpl _download, TRTrackerScraperResponse _response)

		download	= _download;
		response	= _response;
	
Methods Summary
protected TRTrackerScraperResponsegetCurrentResponse()

		TRTrackerScraperResponse	current = download.getDownload().getTrackerScrapeResponse();
		
		if ( current == null ){
			
			current	= response;
		}
		
		return( current );
	
public org.gudy.azureus2.plugins.download.DownloadgetDownload()

		return( download );
	
public longgetNextScrapeStartTime()

			// some weirdness going on here as we're not reporting the current values correctly
			// so quick hack to base this on the current
		
		TRTrackerScraperResponse	current_response = getCurrentResponse();
		
		return( current_response == null?-1:current_response.getNextScrapeStartTime());
	
public intgetNonSeedCount()

		return( response==null?-1:response.getPeers());
	
public intgetResponseType()

		if ( response != null && response.isValid()){
			
			return( RT_SUCCESS );
			
		}else{
			
			return( RT_ERROR );
		}
	
public longgetScrapeStartTime()

		return( response==null?-1:response.getScrapeStartTime());
	
public intgetSeedCount()

		return( response==null?-1:response.getSeeds());
	
public java.lang.StringgetStatus()

		if ( response != null ){
			return( response.getStatusString());
		}
  	
		return("");
	
public java.net.URLgetURL()

		if (response != null) {
			return( response.getURL());
		}
		return null;
	
protected voidsetContent(TRTrackerScraperResponse _response)

		response = _response;
	
public voidsetNextScrapeStartTime(long nextScrapeStartTime)

		TRTrackerScraperResponse	current_response = getCurrentResponse();

		if (current_response != null){
			current_response.setNextScrapeStartTime(nextScrapeStartTime);
		}