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 java.lang.Object
implements ResourceDownloader


Field Summary
protected  AEMonitor this_mon
           
 
Fields inherited from interface org.gudy.azureus2.plugins.utils.resourcedownloader.ResourceDownloader
PR_BOOLEAN_ANONYMOUS, 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(java.lang.String key)
           
 boolean getBooleanProperty(java.lang.String key, boolean maybe_delayed)
           
protected  java.util.List<ResourceDownloaderBaseImpl> getChildren()
           
 ResourceDownloader getClone()
           
abstract  ResourceDownloaderBaseImpl getClone(ResourceDownloaderBaseImpl _parent)
           
protected  java.util.Map getLCKeyProperties()
           
protected  java.lang.String getLogIndent()
           
 long getLongProperty(java.lang.String key)
           
protected  ResourceDownloaderBaseImpl getParent()
           
 java.lang.Object getProperty(java.lang.String name)
          Warning! URL response properties have a type of 'List of String'
protected  java.lang.Object getProperty(java.lang.String name, boolean maybe_delayed)
           
protected  java.lang.Object getPropertySupport(java.lang.String name)
           
 java.lang.String getStringProperty(java.lang.String key)
           
protected  java.lang.String getStringPropertySupport(java.lang.String name)
           
protected  void informActivity(java.lang.String activity)
           
protected  void informAmountComplete(long amount)
           
protected  boolean informComplete(java.io.InputStream is)
           
protected  void informFailed(ResourceDownloaderException e)
           
protected  void informPercentDone(int percentage)
           
protected  boolean isAnonymous()
           
 boolean isCancelled()
           
protected  void removeChild(ResourceDownloaderBaseImpl kid)
           
 void removeListener(ResourceDownloaderListener l)
           
 void reportActivity(ResourceDownloader downloader, java.lang.String activity)
           
 void reportActivity(java.lang.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 setPropertyRecursive(java.lang.String name, java.lang.Object value)
           
protected  void setPropertySupport(java.lang.String name, java.lang.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(java.lang.String key)
                           throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getBooleanProperty

public boolean getBooleanProperty(java.lang.String key,
                                  boolean maybe_delayed)
                           throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getLongProperty

public long getLongProperty(java.lang.String key)
                     throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getStringProperty

public java.lang.String getStringProperty(java.lang.String key)
                                   throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getProperty

public java.lang.Object getProperty(java.lang.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

getProperty

protected java.lang.Object getProperty(java.lang.String name,
                                       boolean maybe_delayed)
                                throws ResourceDownloaderException
Throws:
ResourceDownloaderException

getPropertySupport

protected java.lang.Object getPropertySupport(java.lang.String name)

getLCKeyProperties

protected java.util.Map getLCKeyProperties()

getStringPropertySupport

protected java.lang.String getStringPropertySupport(java.lang.String name)

setPropertiesSet

protected void setPropertiesSet()
                         throws ResourceDownloaderException
Throws:
ResourceDownloaderException

setPropertySupport

protected void setPropertySupport(java.lang.String name,
                                  java.lang.Object value)

setProperties

protected void setProperties(ResourceDownloaderBaseImpl other)

setPropertyRecursive

protected void setPropertyRecursive(java.lang.String name,
                                    java.lang.Object value)
                             throws ResourceDownloaderException
Throws:
ResourceDownloaderException

isAnonymous

protected boolean isAnonymous()

setParent

protected void setParent(ResourceDownloader _parent)

getParent

protected ResourceDownloaderBaseImpl getParent()

addChild

protected void addChild(ResourceDownloaderBaseImpl kid)

removeChild

protected void removeChild(ResourceDownloaderBaseImpl kid)

getChildren

protected java.util.List<ResourceDownloaderBaseImpl> getChildren()

getLogIndent

protected java.lang.String getLogIndent()

addReportListener

protected void addReportListener(ResourceDownloader rd)

informPercentDone

protected void informPercentDone(int percentage)

informAmountComplete

protected void informAmountComplete(long amount)

reportActivity

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

informActivity

protected void informActivity(java.lang.String activity)

informComplete

protected boolean informComplete(java.io.InputStream is)

informFailed

protected void informFailed(ResourceDownloaderException e)

reportActivity

public void reportActivity(ResourceDownloader downloader,
                           java.lang.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