Class ResourceDownloaderBaseImpl
- java.lang.Object
-
- com.biglybt.pifimpl.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
Fields Modifier and Type Field Description private java.util.List<ResourceDownloaderBaseImpl>
children
private boolean
download_cancelled
private java.util.Map
lc_key_properties
private java.util.List
listeners
private ResourceDownloaderBaseImpl
parent
private static java.lang.String
PR_PROPERTIES_SET
private boolean
result_informed
private java.lang.Object
result_informed_data
protected AEMonitor
this_mon
-
Fields inherited from interface com.biglybt.pif.utils.resourcedownloader.ResourceDownloader
PR_BOOLEAN_ANONYMOUS, PR_STRING_CONTENT_TYPE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ResourceDownloaderBaseImpl(ResourceDownloaderBaseImpl _parent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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 com.biglybt.pif.utils.resourcedownloader.ResourceDownloader
asyncDownload, cancel, download, getName, getSize, setProperty
-
-
-
-
Field Detail
-
PR_PROPERTIES_SET
private static final java.lang.String PR_PROPERTIES_SET
- See Also:
- Constant Field Values
-
listeners
private java.util.List listeners
-
result_informed
private boolean result_informed
-
result_informed_data
private java.lang.Object result_informed_data
-
parent
private ResourceDownloaderBaseImpl parent
-
children
private java.util.List<ResourceDownloaderBaseImpl> children
-
download_cancelled
private boolean download_cancelled
-
lc_key_properties
private java.util.Map lc_key_properties
-
this_mon
protected AEMonitor this_mon
-
-
Constructor Detail
-
ResourceDownloaderBaseImpl
protected ResourceDownloaderBaseImpl(ResourceDownloaderBaseImpl _parent)
-
-
Method Detail
-
getClone
public ResourceDownloader getClone()
- Specified by:
getClone
in interfaceResourceDownloader
-
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 interfaceResourceDownloader
- 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 interfaceResourceDownloader
-
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 interfaceResourceDownloader
-
addListener
public void addListener(ResourceDownloaderListener l)
- Specified by:
addListener
in interfaceResourceDownloader
-
removeListener
public void removeListener(ResourceDownloaderListener l)
- Specified by:
removeListener
in interfaceResourceDownloader
-
-