org.gudy.azureus2.pluginsimpl.local.utils.resourcedownloader
Class ResourceDownloaderBaseImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.utils.resourcedownloader.ResourceDownloaderBaseImpl
All Implemented Interfaces:
ResourceDownloader
Direct Known Subclasses:
ResourceDownloaderAlternateImpl, ResourceDownloaderDelayedImpl, ResourceDownloaderErrorImpl, ResourceDownloaderFileImpl, ResourceDownloaderMetaRefreshImpl, ResourceDownloaderRetryImpl, ResourceDownloaderTimeoutImpl, ResourceDownloaderTorrentImpl, ResourceDownloaderURLImpl

public abstract class ResourceDownloaderBaseImpl
extends Object
implements ResourceDownloader


Field Summary
protected  AEMonitor this_mon
           
 
Fields inherited from interface org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader
PR_STRING_CONTENT_TYPE
 
Constructor Summary
protected ResourceDownloaderBaseImpl(ResourceDownloaderBaseImpl _parent)
           
 
Method Summary
protected  void addChild(ResourceDownloaderBaseImpl kid)
           
 void addListener(ResourceDownloaderListener l)
           
protected  void addReportListener(ResourceDownloader rd)
           
 boolean getBooleanProperty(String key)
           
protected  List getChildren()
           
 ResourceDownloader getClone()
           
abstract  ResourceDownloaderBaseImpl getClone(ResourceDownloaderBaseImpl _parent)
           
protected  Map getLCKeyProperties()
           
protected  String getLogIndent()
           
 long getLongProperty(String key)
           
protected  ResourceDownloaderBaseImpl getParent()
           
 Object getProperty(String name)
          Warning! URL response properties have a type of 'List of String'
protected  Object getPropertySupport(String name)
           
 String getStringProperty(String key)
           
protected  String getStringPropertySupport(String name)
           
protected  void informActivity(String activity)
           
protected  void informAmountComplete(long amount)
           
protected  boolean informComplete(InputStream is)
           
protected  void informFailed(ResourceDownloaderException e)
           
protected  void informPercentDone(int percentage)
           
 boolean isCancelled()
           
protected  void removeChild(ResourceDownloaderBaseImpl kid)
           
 void removeListener(ResourceDownloaderListener l)
           
 void reportActivity(ResourceDownloader downloader, String activity)
           
 void reportActivity(String str)
           
 void reportAmountComplete(ResourceDownloader downloader, long amount)
           
 void reportPercentComplete(ResourceDownloader downloader, int percentage)
           
protected  void setCancelled()
           
protected  void setParent(ResourceDownloader _parent)
           
protected  void setProperties(ResourceDownloaderBaseImpl other)
           
protected  void setPropertiesSet()
           
protected  void setPropertySupport(String name, Object value)
           
protected abstract  void setSize(long size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader
asyncDownload, cancel, download, getName, getSize, setProperty
 

Field Detail

this_mon

protected AEMonitor this_mon
Constructor Detail

ResourceDownloaderBaseImpl

protected ResourceDownloaderBaseImpl(ResourceDownloaderBaseImpl _parent)
Method Detail

getClone

public ResourceDownloader getClone()
Specified by:
getClone in interface ResourceDownloader

getClone

public abstract ResourceDownloaderBaseImpl getClone(ResourceDownloaderBaseImpl _parent)

setSize

protected abstract void setSize(long size)

getBooleanProperty

public boolean getBooleanProperty(String key)
                           throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getLongProperty

public long getLongProperty(String key)
                     throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getStringProperty

public String getStringProperty(String key)
                         throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getProperty

public Object getProperty(String name)
                   throws ResourceDownloaderException
Description copied from interface: ResourceDownloader
Warning! URL response properties have a type of 'List of String'

Specified by:
getProperty in interface ResourceDownloader
Returns:
Throws:
ResourceDownloaderException

getPropertySupport

protected Object getPropertySupport(String name)

getLCKeyProperties

protected Map getLCKeyProperties()

getStringPropertySupport

protected String getStringPropertySupport(String name)

setPropertiesSet

protected void setPropertiesSet()
                         throws ResourceDownloaderException
Throws:
ResourceDownloaderException

setPropertySupport

protected void setPropertySupport(String name,
                                  Object value)

setProperties

protected void setProperties(ResourceDownloaderBaseImpl other)

setParent

protected void setParent(ResourceDownloader _parent)

getParent

protected ResourceDownloaderBaseImpl getParent()

addChild

protected void addChild(ResourceDownloaderBaseImpl kid)

removeChild

protected void removeChild(ResourceDownloaderBaseImpl kid)

getChildren

protected List getChildren()

getLogIndent

protected String getLogIndent()

addReportListener

protected void addReportListener(ResourceDownloader rd)

informPercentDone

protected void informPercentDone(int percentage)

informAmountComplete

protected void informAmountComplete(long amount)

reportActivity

public void reportActivity(String str)
Specified by:
reportActivity in interface ResourceDownloader

informActivity

protected void informActivity(String activity)

informComplete

protected boolean informComplete(InputStream is)

informFailed

protected void informFailed(ResourceDownloaderException e)

reportActivity

public void reportActivity(ResourceDownloader downloader,
                           String activity)

reportPercentComplete

public void reportPercentComplete(ResourceDownloader downloader,
                                  int percentage)

reportAmountComplete

public void reportAmountComplete(ResourceDownloader downloader,
                                 long amount)

setCancelled

protected void setCancelled()

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface ResourceDownloader

addListener

public void addListener(ResourceDownloaderListener l)
Specified by:
addListener in interface ResourceDownloader

removeListener

public void removeListener(ResourceDownloaderListener l)
Specified by:
removeListener in interface ResourceDownloader