Class DownloadManagerStateImpl
java.lang.Object
com.biglybt.core.download.impl.DownloadManagerStateImpl
- All Implemented Interfaces:
ParameterListener, DownloadManagerState, LinkFileMap.IndexResolver
public class DownloadManagerStateImpl
extends Object
implements DownloadManagerState, ParameterListener, LinkFileMap.IndexResolver
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class(package private) static classNested classes/interfaces inherited from interface DownloadManagerState
DownloadManagerState.ResumeHistory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Fileprivate static final Stringprivate Mapprivate static final Stringprivate static final Stringprivate Categoryprivate static final AEMonitorprivate static booleanprivate static final Mapprivate static final Mapprivate static booleanprivate DownloadManagerImplprivate WeakReference<LinkFileMap> private static final CopyOnWriteMap<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> private static final CopyOnWriteMap<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> private static final Mapprivate static final ArrayListprivate final CopyOnWriteMap<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> private final CopyOnWriteMap<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> private static final LogIDsprivate Mapprivate static final Randomprivate booleanprivate static final Stringprivate static final Stringprivate final File(package private) static final Map<HashWrapper, DownloadManagerStateImpl> static booleanprivate intprivate final AEMonitorprivate static final ThreadLocalprivate final TorrentUtils.ExtendedTorrentprivate static final Stringprivate intprivate static final intprivate static final intprivate static final intprivate final ConcurrentHashMap<String, AtomicInteger> private longprivate booleanFields inherited from interface DownloadManagerState
AT_AGGREGATE_SCRAPE_CACHE, AT_AVAIL_BAD_TIME, AT_CANONICAL_SD_DMAP, AT_CATEGORY, AT_COMPLETE_LAST_TIME, AT_DISPLAY_NAME, AT_DL_FILE_ALERTS, AT_DND_ALT_LOC, AT_DND_PREFIX, AT_DND_SUBFOLDER, AT_FILE_ALLOC_ORDER, AT_FILE_ALLOC_REQUEST, AT_FILE_ALLOC_STRATEGY, AT_FILE_DOWNLOADED, AT_FILE_FLAGS, AT_FILE_LINKS2, AT_FILE_OTHER_HASHES, AT_FILE_STORE_TYPES, AT_FILES_EXPANDED, AT_FLAGS, AT_INCOMP_FILE_SUFFIX, AT_LAST_ADDED_TO_ACTIVE_TAG, AT_LAST_SCRAPE_TIME, AT_MASK_DL_COMP_OPTIONAL, AT_MD_INFO_DICT_SIZE, AT_MERGED_DATA, AT_MOVE_ON_COMPLETE_DIR, AT_NETWORKS, AT_PARAMETERS, AT_PEAK_RECEIVE_RATE, AT_PEAK_SEND_RATE, AT_PEER_SOURCES, AT_PEER_SOURCES_DENIED, AT_PLUGIN_OPTIONS, AT_PO_ENABLE_ANNOUNCE, AT_PRIMARY_FILE_IDX, AT_PRIMARY_FILE_PATH, AT_REAL_DM_MAGNET_TIME, AT_RELATIVE_SAVE_PATH, AT_REORDER_MIN_MB, AT_RESUME_STATE, AT_SCRAPE_CACHE, AT_SCRAPE_CACHE_SOURCE, AT_SECRETS, AT_SET_FILE_PRIORITY_REM_PERCENT, AT_SET_FILE_PRIORITY_REM_PIECE, AT_SHARE_RATIO_PROGRESS, AT_SKIPPED_BUT_DOWNLOADED, AT_SKIPPED_FILESET_SIZE, AT_SWARM_TAGS, AT_TIME_SINCE_DOWNLOAD, AT_TIME_SINCE_UPLOAD, AT_TIME_STOPPED, AT_TORRENT_EXPORT_PROPAGATED, AT_TORRENT_SAVE_TIME, AT_TRACKER_CLIENT_EXTENSIONS, AT_TRACKER_SESSION_STATS, AT_TRANSIENT_FLAGS, AT_TRANSIENT_TAG_SORT, AT_USER, AT_USER_COMMENT, AT_VERSION, AT_VIEW_FILTERS, ATTRIBUTE_DEFAULTS, DEFAULT_MAX_UPLOADS, DEFAULT_UPLOAD_PRIORITY, FAS_DEFAULT, FAS_SPARSE, FAS_SPARSE_ZERO_LENGTH, FAS_ZERO_NEW, FAS_ZERO_NEW_STOP, FILE_FLAG_NOT_NEW, FLAG_ALLOW_PERMITTED_PEER_SOURCE_CHANGES, FLAG_DISABLE_AUTO_FILE_MOVE, FLAG_DISABLE_IP_FILTER, FLAG_DISABLE_STOP_AFTER_ALLOC, FLAG_DO_NOT_DELETE_DATA_ON_REMOVE, FLAG_ERROR_REPORTED, FLAG_FORCE_DIRECT_DELETE, FLAG_INITIAL_NETWORKS_SET, FLAG_LOW_NOISE, FLAG_METADATA_DOWNLOAD, FLAG_MOVE_ON_COMPLETION_DONE, FLAG_ONLY_EVER_SEEDED, FLAG_SCAN_INCOMPLETE_PIECES, FLAG_SEQUENTIAL_DOWNLOAD, MIN_MAX_UPLOADS, PARAM_DND_FLAGS, PARAM_DOWNLOAD_ADDED_TIME, PARAM_DOWNLOAD_COMPLETED_TIME, PARAM_DOWNLOAD_FILE_COMPLETED_TIME, PARAM_DOWNLOAD_LAST_ACTIVE_TIME, PARAM_MAX_PEERS, PARAM_MAX_PEERS_WHEN_SEEDING, PARAM_MAX_PEERS_WHEN_SEEDING_ENABLED, PARAM_MAX_SEEDS, PARAM_MAX_SHARE_RATIO, PARAM_MAX_UPLOAD_WHEN_BUSY, PARAM_MAX_UPLOADS, PARAM_MAX_UPLOADS_WHEN_SEEDING, PARAM_MAX_UPLOADS_WHEN_SEEDING_ENABLED, PARAM_MIN_SHARE_RATIO, PARAM_RANDOM_SEED, PARAM_STATS_COUNTED, PARAM_UPLOAD_PRIORITY, PARAMETERS, TRANSIENT_FLAG_FRIEND_FP, TRANSIENT_FLAG_TAG_FP, TRANSIENT_FLAG_TAG_NOT_FP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDownloadManagerStateImpl(DownloadManagerImpl _download_manager, TorrentUtils.ExtendedTorrent _torrent) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddGlobalListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) voidaddListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) voidvoidvoidprivate static voidcopyTorrentToActive(TOTorrent torrent_file, File state_file, boolean was_corrupt) voiddelete()deletes the saved statestatic voiddeleteDownloadState(byte[] download_hash, boolean delete_cache) static voiddeleteDownloadState(File source_dir, byte[] download_hash) voidstatic voidvoiddump(IndentWriter writer) booleanexportState(File target_dir) voidgenerateEvidence(IndentWriter writer, boolean full) booleangetAttribute(String name) private BEncodableObjectgetBencodableAttribute(String attribute_name) booleangetBooleanAttribute(String name) booleangetBooleanParameter(String name) static Booleanprivate static ObjectgetDefaultOverride(String name, Object value) static DownloadManagerStateprivate static DownloadManagerStateImplgetDownloadState(DownloadManagerImpl download_manager, TOTorrent original_torrent, TorrentUtils.ExtendedTorrent target_torrent) protected static DownloadManagerStategetDownloadState(DownloadManagerImpl download_manager, String torrent_file, byte[] torrent_hash, boolean inactive) static DownloadManagerStategetDownloadState(TOTorrent original_torrent) intgetFileFlags(int file_index) getFileLink(int source_index) getFileLink(int source_index, StringInterner.FileKey def) Returns file link if it exists, def if notreturns a File -> File map of the defined links (empty if no links)private LinkFileMapbooleangetFlag(long flag) longgetFlags()protected static FileintgetIntAttribute(String name) intgetIntParameter(String name) static IntegergetIntParameterDefault(String name) String[]getListAttribute(String attribute_name) getListAttribute(String name, int idx) getListAttributeSupport(String attribute_name, boolean intern) longgetLongAttribute(String attribute_name) longgetLongParameter(String name) getMapAttribute(String attribute_name) String[]String[]Ordered by time, most recent lastprotected static FilegetStateFile(byte[] torrent_hash) protected StringgetStringAttribute(String attribute_name) getTransientAttribute(String name) booleangetTransientFlag(long flag) longbooleanhasAttribute(String name) static voidimportDownloadState(File source_dir, byte[] download_hash) private voidinformWillRead(String attribute_name) private voidinformWritten(String attribute_name, boolean changed) booleanisNetworkEnabled(String network) booleanbooleanisPeerSourceEnabled(String peerSource) booleanisPeerSourcePermitted(String peerSource) booleanstatic voidprotected voidmergeTorrentDetails(TOTorrent other_torrent) voidparameterChanged(String parameterName) Called, when a parameter has changed.booleanparameterExists(String name) voidremoveAttribute(String attribute_name) static voidremoveGlobalListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) voidremoveListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) intresolveFile(String file) voidvoidsave(boolean interim) static voidprotected voidsaveSupport(boolean interim, boolean force) voidsetActive(boolean active) voidsetAttribute(String name, String value) voidsetAttribute(String name, String value, boolean set_dirty) private voidsetBEncodableAttribute(String attribute_name, BEncodableObject attribute_value, boolean cache_only) Assumption is that the value has changed so we don't check for thatvoidsetBooleanAttribute(String name, boolean value) voidsetBooleanParameter(String name, boolean value) voidsetCategory(Category cat) static voidsetDebugOn(boolean on) private voidsetDirty(boolean slightly) voidsetDisplayName(String value) protected voidvoidsetFileFlags(int file_index, int flags) voidsetFileLink(int source_index, File link_source, File link_destination) voidsetFileLinks(List<Integer> source_indexes, List<File> link_sources_may_have_nulls, List<File> link_destinations) voidsetFlag(long flag, boolean set) voidsetIntAttribute(String name, int value) voidsetIntParameter(String name, int value) voidsetListAttribute(String name, String[] values) protected voidsetListAttribute(String attribute_name, List attribute_value) voidsetLongAttribute(String attribute_name, long attribute_value) voidsetLongParameter(String name, long value) voidsetMapAttribute(String attribute_name, Map attribute_value) voidsetNetworkEnabled(String network, boolean enabled) voidsetNetworks(String[] networks) voidsetParameterDefault(String name) Reset to default valuevoidsetPeerSourceEnabled(String source, boolean enabled) voidsetPeerSourcePermitted(String peerSource, boolean enabled) voidsetPeerSources(String[] ps) private voidvoidsetResumeData(Map new_data) protected voidsetStringAttribute(String attribute_name, String attribute_value, boolean set_dirty) voidsetTrackerClientExtensions(String value) voidsetTrackerResponseCache(Map value) voidsetTransientAttribute(String name, Object value) voidsetTransientFlag(long flag, boolean set) voidsetUserComment(String value) voidsuppressStateSave(boolean suppress) This method should only be invoked in matching try-finally pairs.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DownloadManagerState
getOptionalBooleanAttribute, setOptionalBooleanAttribute
-
Field Details
-
VER_INCOMING_PEER_SOURCE
private static final int VER_INCOMING_PEER_SOURCE- See Also:
-
VER_HOLE_PUNCH_PEER_SOURCE
private static final int VER_HOLE_PUNCH_PEER_SOURCE- See Also:
-
VER_CURRENT
private static final int VER_CURRENT- See Also:
-
LOGID
-
RESUME_KEY
- See Also:
-
RESUME_HISTORY_KEY
- See Also:
-
TRACKER_CACHE_KEY
- See Also:
-
ATTRIBUTE_KEY
- See Also:
-
AZUREUS_PROPERTIES_KEY
- See Also:
-
AZUREUS_PRIVATE_PROPERTIES_KEY
- See Also:
-
ACTIVE_DIR
-
SUPPRESS_FIXUP_ERRORS
public static boolean SUPPRESS_FIXUP_ERRORS -
disable_interim_saves
private static boolean disable_interim_saves -
random
-
default_parameters
-
default_attributes
-
debug_on
private static boolean debug_on -
class_mon
-
state_map
-
global_state_cache
-
global_state_cache_wrappers
-
global_listeners_read_map_cow
private static final CopyOnWriteMap<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> global_listeners_read_map_cow -
global_listeners_write_map_cow
private static final CopyOnWriteMap<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> global_listeners_write_map_cow -
download_manager
-
torrent
-
state_dir
-
write_required_soon
private boolean write_required_soon -
write_required_sometime
private long write_required_sometime -
category
-
listeners_read_map_cow
private final CopyOnWriteMap<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> listeners_read_map_cow -
listeners_write_map_cow
private final CopyOnWriteMap<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> listeners_write_map_cow -
write_always_inform_set
-
parameters
-
attributes
-
this_mon
-
supressWrites
private int supressWrites -
recovered
private boolean recovered -
tls_wbr
-
transient_flags
private int transient_flags -
transient_attributes
-
file_link_cache
-
-
Constructor Details
-
DownloadManagerStateImpl
protected DownloadManagerStateImpl(DownloadManagerImpl _download_manager, TorrentUtils.ExtendedTorrent _torrent)
-
-
Method Details
-
setDebugOn
public static void setDebugOn(boolean on) -
getDefaultOverride
-
getIntParameterDefault
-
getBooleanParameterDefault
-
getDownloadState
private static DownloadManagerStateImpl getDownloadState(DownloadManagerImpl download_manager, TOTorrent original_torrent, TorrentUtils.ExtendedTorrent target_torrent) throws TOTorrentException - Throws:
TOTorrentException
-
getDownloadState
public static DownloadManagerState getDownloadState(TOTorrent original_torrent) throws TOTorrentException - Throws:
TOTorrentException
-
getDownloadState
protected static DownloadManagerState getDownloadState(DownloadManagerImpl download_manager, String torrent_file, byte[] torrent_hash, boolean inactive) throws TOTorrentException - Throws:
TOTorrentException
-
copyTorrentToActive
private static void copyTorrentToActive(TOTorrent torrent_file, File state_file, boolean was_corrupt) throws TOTorrentException - Throws:
TOTorrentException
-
getStateFile
-
getGlobalStateFile
-
loadGlobalStateCache
public static void loadGlobalStateCache() -
saveGlobalStateCache
public static void saveGlobalStateCache() -
discardGlobalStateCache
public static void discardGlobalStateCache() -
importDownloadState
public static void importDownloadState(File source_dir, byte[] download_hash) throws DownloadManagerException - Throws:
DownloadManagerException
-
deleteDownloadState
public static void deleteDownloadState(byte[] download_hash, boolean delete_cache) throws DownloadManagerException - Throws:
DownloadManagerException
-
deleteDownloadState
public static void deleteDownloadState(File source_dir, byte[] download_hash) throws DownloadManagerException - Throws:
DownloadManagerException
-
parameterChanged
Description copied from interface:ParameterListenerCalled, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.- Specified by:
parameterChangedin interfaceParameterListener- Parameters:
parameterName- the name of the parameter that has changed
-
getDownloadManager
- Specified by:
getDownloadManagerin interfaceDownloadManagerState
-
setDownloadManager
-
getStateDir
- Specified by:
getStateDirin interfaceDownloadManagerState
-
setRecovered
private void setRecovered() -
getAndClearRecoveredStatus
public boolean getAndClearRecoveredStatus()- Specified by:
getAndClearRecoveredStatusin interfaceDownloadManagerState
-
clearTrackerResponseCache
public void clearTrackerResponseCache()- Specified by:
clearTrackerResponseCachein interfaceDownloadManagerState
-
getTrackerResponseCache
- Specified by:
getTrackerResponseCachein interfaceDownloadManagerState
-
setTrackerResponseCache
- Specified by:
setTrackerResponseCachein interfaceDownloadManagerState
-
getResumeData
- Specified by:
getResumeDatain interfaceDownloadManagerState
-
clearResumeData
public void clearResumeData()- Specified by:
clearResumeDatain interfaceDownloadManagerState
-
setResumeData
- Specified by:
setResumeDatain interfaceDownloadManagerState
-
isResumeDataComplete
public boolean isResumeDataComplete()- Specified by:
isResumeDataCompletein interfaceDownloadManagerState
-
getResumeDataHistory
Description copied from interface:DownloadManagerStateOrdered by time, most recent last- Specified by:
getResumeDataHistoryin interfaceDownloadManagerState- Returns:
-
restoreResumeData
- Specified by:
restoreResumeDatain interfaceDownloadManagerState
-
getTorrent
- Specified by:
getTorrentin interfaceDownloadManagerState
-
setActive
public void setActive(boolean active) - Specified by:
setActivein interfaceDownloadManagerState
-
discardFluff
public void discardFluff()- Specified by:
discardFluffin interfaceDownloadManagerState
-
exportState
- Specified by:
exportStatein interfaceDownloadManagerState
-
suppressStateSave
public void suppressStateSave(boolean suppress) Description copied from interface:DownloadManagerStateThis method should only be invoked in matching try-finally pairs. If it is invoked with true multiple times it must be invoked with false the equal amount of times to reallow state writes- Specified by:
suppressStateSavein interfaceDownloadManagerState- Parameters:
suppress- when set to true prevents flushing of the state/increments the internal nesting counter, decrements/allows flush otherwise
-
setDirty
private void setDirty(boolean slightly) -
save
public void save(boolean interim) - Specified by:
savein interfaceDownloadManagerState
-
saveSupport
protected void saveSupport(boolean interim, boolean force) -
delete
public void delete()Description copied from interface:DownloadManagerStatedeletes the saved state- Specified by:
deletein interfaceDownloadManagerState
-
mergeTorrentDetails
-
setFlag
public void setFlag(long flag, boolean set) - Specified by:
setFlagin interfaceDownloadManagerState
-
getFlag
public boolean getFlag(long flag) - Specified by:
getFlagin interfaceDownloadManagerState
-
getFlags
public long getFlags()- Specified by:
getFlagsin interfaceDownloadManagerState
-
setTransientFlag
public void setTransientFlag(long flag, boolean set) - Specified by:
setTransientFlagin interfaceDownloadManagerState
-
getTransientFlag
public boolean getTransientFlag(long flag) - Specified by:
getTransientFlagin interfaceDownloadManagerState
-
getTransientFlags
public long getTransientFlags()- Specified by:
getTransientFlagsin interfaceDownloadManagerState
-
getTransientAttribute
- Specified by:
getTransientAttributein interfaceDownloadManagerState
-
setTransientAttribute
- Specified by:
setTransientAttributein interfaceDownloadManagerState
-
parameterExists
- Specified by:
parameterExistsin interfaceDownloadManagerState- Parameters:
name-- Returns:
-
setParameterDefault
Description copied from interface:DownloadManagerStateReset to default value- Specified by:
setParameterDefaultin interfaceDownloadManagerState- Parameters:
name-
-
getLongParameter
- Specified by:
getLongParameterin interfaceDownloadManagerState
-
setLongParameter
- Specified by:
setLongParameterin interfaceDownloadManagerState
-
getIntParameter
- Specified by:
getIntParameterin interfaceDownloadManagerState
-
setIntParameter
- Specified by:
setIntParameterin interfaceDownloadManagerState
-
getBooleanParameter
- Specified by:
getBooleanParameterin interfaceDownloadManagerState
-
setBooleanParameter
- Specified by:
setBooleanParameterin interfaceDownloadManagerState
-
setAttribute
- Specified by:
setAttributein interfaceDownloadManagerState
-
setAttribute
- Specified by:
setAttributein interfaceDownloadManagerState
-
getAttribute
- Specified by:
getAttributein interfaceDownloadManagerState
-
getCategory
- Specified by:
getCategoryin interfaceDownloadManagerState
-
setCategory
- Specified by:
setCategoryin interfaceDownloadManagerState
-
getTrackerClientExtensions
- Specified by:
getTrackerClientExtensionsin interfaceDownloadManagerState
-
setTrackerClientExtensions
- Specified by:
setTrackerClientExtensionsin interfaceDownloadManagerState
-
getDisplayName
- Specified by:
getDisplayNamein interfaceDownloadManagerState
-
setDisplayName
- Specified by:
setDisplayNamein interfaceDownloadManagerState
-
getUserComment
- Specified by:
getUserCommentin interfaceDownloadManagerState
-
setUserComment
- Specified by:
setUserCommentin interfaceDownloadManagerState
-
getRelativeSavePath
- Specified by:
getRelativeSavePathin interfaceDownloadManagerState
-
getPrimaryFile
- Specified by:
getPrimaryFilein interfaceDownloadManagerState
-
getPrimaryFilePath
- Specified by:
getPrimaryFilePathin interfaceDownloadManagerState
-
getNetworks
- Specified by:
getNetworksin interfaceDownloadManagerState
-
isNetworkEnabled
- Specified by:
isNetworkEnabledin interfaceDownloadManagerState
-
setNetworks
- Specified by:
setNetworksin interfaceDownloadManagerState
-
setNetworkEnabled
- Specified by:
setNetworkEnabledin interfaceDownloadManagerState
-
getPeerSources
- Specified by:
getPeerSourcesin interfaceDownloadManagerState
-
isPeerSourceEnabled
- Specified by:
isPeerSourceEnabledin interfaceDownloadManagerState
-
isPeerSourcePermitted
- Specified by:
isPeerSourcePermittedin interfaceDownloadManagerState
-
setPeerSourcePermitted
- Specified by:
setPeerSourcePermittedin interfaceDownloadManagerState
-
setPeerSources
- Specified by:
setPeerSourcesin interfaceDownloadManagerState
-
setPeerSourceEnabled
- Specified by:
setPeerSourceEnabledin interfaceDownloadManagerState
-
setFileLink
- Specified by:
setFileLinkin interfaceDownloadManagerState
-
setFileLinks
public void setFileLinks(List<Integer> source_indexes, List<File> link_sources_may_have_nulls, List<File> link_destinations) - Specified by:
setFileLinksin interfaceDownloadManagerState
-
clearFileLinks
public void clearFileLinks()- Specified by:
clearFileLinksin interfaceDownloadManagerState
-
getFileLink
- Specified by:
getFileLinkin interfaceDownloadManagerState
-
getFileLink
Description copied from interface:DownloadManagerStateReturns file link if it exists, def if not- Specified by:
getFileLinkin interfaceDownloadManagerState- Parameters:
source_index-def-- Returns:
-
getFileLinks
Description copied from interface:DownloadManagerStatereturns a File -> File map of the defined links (empty if no links)- Specified by:
getFileLinksin interfaceDownloadManagerState- Returns:
-
resolveFile
- Specified by:
resolveFilein interfaceLinkFileMap.IndexResolver
-
getFileLinksSupport
-
getFileFlags
public int getFileFlags(int file_index) - Specified by:
getFileFlagsin interfaceDownloadManagerState
-
setFileFlags
public void setFileFlags(int file_index, int flags) - Specified by:
setFileFlagsin interfaceDownloadManagerState
-
isOurContent
public boolean isOurContent()- Specified by:
isOurContentin interfaceDownloadManagerState- Returns:
-
getStringAttribute
-
setStringAttribute
-
getLongAttribute
- Specified by:
getLongAttributein interfaceDownloadManagerState
-
setLongAttribute
- Specified by:
setLongAttributein interfaceDownloadManagerState
-
setListAttribute
- Specified by:
setListAttributein interfaceDownloadManagerState
-
getListAttribute
- Specified by:
getListAttributein interfaceDownloadManagerState
-
getListAttribute
- Specified by:
getListAttributein interfaceDownloadManagerState
-
getListAttributeSupport
-
setListAttribute
-
getBencodableAttribute
-
setBEncodableAttribute
private void setBEncodableAttribute(String attribute_name, BEncodableObject attribute_value, boolean cache_only) Assumption is that the value has changed so we don't check for that- Parameters:
attribute_name-attribute_value-
-
getMapAttribute
- Specified by:
getMapAttributein interfaceDownloadManagerState
-
setMapAttribute
- Specified by:
setMapAttributein interfaceDownloadManagerState
-
hasAttribute
- Specified by:
hasAttributein interfaceDownloadManagerState
-
removeAttribute
- Specified by:
removeAttributein interfaceDownloadManagerState
-
setIntAttribute
- Specified by:
setIntAttributein interfaceDownloadManagerState
-
getIntAttribute
- Specified by:
getIntAttributein interfaceDownloadManagerState
-
setBooleanAttribute
- Specified by:
setBooleanAttributein interfaceDownloadManagerState
-
getBooleanAttribute
- Specified by:
getBooleanAttributein interfaceDownloadManagerState
-
getDownloadState
-
informWritten
-
informWillRead
-
addListener
- Specified by:
addListenerin interfaceDownloadManagerState- Parameters:
l- Listener to fireattribute- attribute to listen for (null for all)event_type-DownloadManagerStateAttributeListener.WILL_BE_READorDownloadManagerStateAttributeListener.WRITTEN
-
removeListener
public void removeListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) - Specified by:
removeListenerin interfaceDownloadManagerState
-
addGlobalListener
public static void addGlobalListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) -
removeGlobalListener
public static void removeGlobalListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) -
generateEvidence
- Specified by:
generateEvidencein interfaceDownloadManagerState
-
dump
- Specified by:
dumpin interfaceDownloadManagerState
-