Class ResourceDownloaderErrorImpl
java.lang.Object
com.biglybt.pifimpl.local.utils.resourcedownloader.ResourceDownloaderBaseImpl
com.biglybt.pifimpl.local.utils.resourcedownloader.ResourceDownloaderErrorImpl
- All Implemented Interfaces:
ResourceDownloader
-
Field Summary
FieldsFields inherited from class com.biglybt.pifimpl.local.utils.resourcedownloader.ResourceDownloaderBaseImpl
this_mon
Fields inherited from interface com.biglybt.pif.utils.resourcedownloader.ResourceDownloader
PR_BOOLEAN_ANONYMOUS, PR_STRING_CONTENT_TYPE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Asynchronously download.void
cancel()
Cancel the download.download()
Synchronously download.getClone
(ResourceDownloaderBaseImpl parent) getName()
Get a sensible name for the download based on its details (e.g.long
getSize()
Attempts to get the size of the download.void
reportActivity
(String activity) void
setProperty
(String name, Object value) protected void
setSize
(long size) Methods inherited from class com.biglybt.pifimpl.local.utils.resourcedownloader.ResourceDownloaderBaseImpl
addChild, addReportListener, getBooleanProperty, getBooleanProperty, getChildren, getClone, getLCKeyProperties, getLogIndent, getLongProperty, getParent, getProperty, getProperty, getPropertySupport, getStringProperty, getStringPropertySupport, informActivity, informAmountComplete, informComplete, informFailed, informPercentDone, isAnonymous, isCancelled, removeChild, removeListener, reportActivity, reportAmountComplete, reportPercentComplete, setCancelled, setParent, setProperties, setPropertiesSet, setPropertyRecursive, setPropertySupport
-
Field Details
-
error
-
-
Constructor Details
-
ResourceDownloaderErrorImpl
protected ResourceDownloaderErrorImpl(ResourceDownloaderBaseImpl _parent, ResourceDownloaderException _error)
-
-
Method Details
-
getName
Description copied from interface:ResourceDownloader
Get a sensible name for the download based on its details (e.g. URL)- Returns:
-
getClone
- Specified by:
getClone
in classResourceDownloaderBaseImpl
-
download
Description copied from interface:ResourceDownloader
Synchronously download. Events are still reported to listeners- Returns:
- Throws:
ResourceDownloaderException
-
asyncDownload
public void asyncDownload()Description copied from interface:ResourceDownloader
Asynchronously download. -
setSize
protected void setSize(long size) - Specified by:
setSize
in classResourceDownloaderBaseImpl
-
setProperty
-
getSize
Description copied from interface:ResourceDownloader
Attempts to get the size of the download. Returns -1 if the size can't be determined.Note: You must not call this method from the reportActivity callback method.
- Throws:
ResourceDownloaderException
-
cancel
public void cancel()Description copied from interface:ResourceDownloader
Cancel the download. -
reportActivity
- Specified by:
reportActivity
in interfaceResourceDownloader
- Overrides:
reportActivity
in classResourceDownloaderBaseImpl
-
addListener
- Specified by:
addListener
in interfaceResourceDownloader
- Overrides:
addListener
in classResourceDownloaderBaseImpl
-