Class ResourceDownloaderDelayedImpl
java.lang.Object
com.biglybt.pifimpl.local.utils.resourcedownloader.ResourceDownloaderBaseImpl
com.biglybt.pifimpl.local.utils.resourcedownloader.ResourceDownloaderDelayedImpl
- All Implemented Interfaces:
ResourceDownloader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ResourceDownloaderBaseImplprotected ResourceDownloaderDelayedFactoryprotected longFields inherited from class ResourceDownloaderBaseImpl
this_monFields inherited from interface ResourceDownloader
PR_BOOLEAN_ANONYMOUS, PR_STRING_CONTENT_TYPE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResourceDownloaderDelayedImpl(ResourceDownloaderBaseImpl _parent, ResourceDownloaderDelayedFactory _factory) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAsynchronously download.voidcancel()Cancel the download.download()Synchronously download.getClone(ResourceDownloaderBaseImpl parent) protected voidgetName()Get a sensible name for the download based on its details (e.g.longgetSize()Attempts to get the size of the download.voidvoidreportActivity(String activity) voidsetProperty(String name, Object value) protected voidsetSize(long _size) Methods inherited from class ResourceDownloaderBaseImpl
addChild, addReportListener, getBooleanProperty, getBooleanProperty, getChildren, getClone, getLCKeyProperties, getLogIndent, getLongProperty, getParent, getProperty, getProperty, getPropertySupport, getStringProperty, getStringPropertySupport, informActivity, informAmountComplete, informComplete, informFailed, informPercentDone, isAnonymous, isCancelled, removeChild, reportActivity, reportAmountComplete, reportPercentComplete, setCancelled, setParent, setProperties, setPropertiesSet, setPropertyRecursive, setPropertySupport
-
Field Details
-
factory
-
delegate
-
size
protected long size
-
-
Constructor Details
-
ResourceDownloaderDelayedImpl
protected ResourceDownloaderDelayedImpl(ResourceDownloaderBaseImpl _parent, ResourceDownloaderDelayedFactory _factory)
-
-
Method Details
-
getDelegate
protected void getDelegate() -
getName
Description copied from interface:ResourceDownloaderGet a sensible name for the download based on its details (e.g. URL)- Returns:
-
getClone
- Specified by:
getClonein classResourceDownloaderBaseImpl
-
download
Description copied from interface:ResourceDownloaderSynchronously download. Events are still reported to listeners- Returns:
- Throws:
ResourceDownloaderException
-
asyncDownload
public void asyncDownload()Description copied from interface:ResourceDownloaderAsynchronously download. -
setSize
protected void setSize(long _size) - Specified by:
setSizein classResourceDownloaderBaseImpl
-
setProperty
- Throws:
ResourceDownloaderException
-
getSize
Description copied from interface:ResourceDownloaderAttempts 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
-
reportActivity
- Specified by:
reportActivityin interfaceResourceDownloader- Overrides:
reportActivityin classResourceDownloaderBaseImpl
-
addListener
- Specified by:
addListenerin interfaceResourceDownloader- Overrides:
addListenerin classResourceDownloaderBaseImpl
-
removeListener
- Specified by:
removeListenerin interfaceResourceDownloader- Overrides:
removeListenerin classResourceDownloaderBaseImpl
-