Class DownloadStubImpl
java.lang.Object
com.biglybt.pifimpl.local.download.DownloadStubImpl
- All Implemented Interfaces:
DownloadStub, DownloadStub.DownloadStubEx
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface DownloadStub
DownloadStub.DownloadStubEx, DownloadStub.DownloadStubFile -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final longprivate final longprivate final DownloadStubImpl.DownloadStubFileImpl[]private final byte[]private final Stringprivate final DownloadManagerImplprivate final String[]private final Stringprivate Stringprivate final intprivate final longprivate DownloadImpl -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDownloadStubImpl(DownloadManagerImpl _manager, DownloadImpl _download, DownloadManager _core_dm, String[] _manual_tags, String _category, Map<String, Object> _gm_map) protectedDownloadStubImpl(DownloadManagerImpl _manager, Map<String, Object> _map) -
Method Summary
Modifier and TypeMethodDescriptionprivate intcountFiles(File dir) longlonggetGMMap()longgetLongAttribute(TorrentAttribute attribute) There are logically separate from the un-stubbed download, if you want to synchronize values from non-stub and stub then it is up to you to do it.String[]getName()intbyte[]longbooleanisStub()voidremove()voidremove(boolean delete_torrent, boolean delete_data) voidsetLongAttribute(TorrentAttribute attribute, long value) protected voidsetSavePath(String sp) Can ONLY be used before the stub is initially savedprotected void
-
Field Details
-
manager
-
name
-
hash
private final byte[] hash -
size
private final long size -
date_created
private final long date_created -
date_completed
private final long date_completed -
save_path
-
main_tracker
-
files
-
manual_tags
-
category
-
gm_map
-
temp_download
-
attributes
-
-
Constructor Details
-
DownloadStubImpl
protected DownloadStubImpl(DownloadManagerImpl _manager, DownloadImpl _download, DownloadManager _core_dm, String[] _manual_tags, String _category, Map<String, Object> _gm_map) -
DownloadStubImpl
-
-
Method Details
-
exportToMap
-
isStub
public boolean isStub()- Specified by:
isStubin interfaceDownloadStub
-
setStubbified
protected void setStubbified() -
destubbify
- Specified by:
destubbifyin interfaceDownloadStub- Throws:
DownloadException
-
getTorrent
- Specified by:
getTorrentin interfaceDownloadStub
-
getName
- Specified by:
getNamein interfaceDownloadStub
-
getTorrentHash
public byte[] getTorrentHash()- Specified by:
getTorrentHashin interfaceDownloadStub
-
getTorrentSize
public long getTorrentSize()- Specified by:
getTorrentSizein interfaceDownloadStub
-
getCreationDate
public long getCreationDate()- Specified by:
getCreationDatein interfaceDownloadStub.DownloadStubEx
-
getCompletionDate
public long getCompletionDate()- Specified by:
getCompletionDatein interfaceDownloadStub.DownloadStubEx
-
getSavePath
- Specified by:
getSavePathin interfaceDownloadStub
-
setSavePath
Can ONLY be used before the stub is initially saved- Parameters:
sp-
-
getMainTracker
- Specified by:
getMainTrackerin interfaceDownloadStub
-
getStubFiles
- Specified by:
getStubFilesin interfaceDownloadStub
-
getManualTags
- Specified by:
getManualTagsin interfaceDownloadStub.DownloadStubEx
-
getCategory
- Specified by:
getCategoryin interfaceDownloadStub.DownloadStubEx
-
getLongAttribute
Description copied from interface:DownloadStubThere are logically separate from the un-stubbed download, if you want to synchronize values from non-stub and stub then it is up to you to do it. So I suggest that you infact don't do this but just use these methods as a means to cache essential attributes from unstubbed ones in the 'will-be-added' listener event- Specified by:
getLongAttributein interfaceDownloadStub- Parameters:
attribute-- Returns:
-
setLongAttribute
- Specified by:
setLongAttributein interfaceDownloadStub
-
getGMMap
-
remove
public void remove()- Specified by:
removein interfaceDownloadStub
-
remove
public void remove(boolean delete_torrent, boolean delete_data) throws DownloadException, DownloadRemovalVetoException - Specified by:
removein interfaceDownloadStub.DownloadStubEx- Throws:
DownloadExceptionDownloadRemovalVetoException
-
countFiles
-