Package com.biglybt.core.download.impl
Class DownloadManagerStateImpl
java.lang.Object
com.biglybt.core.download.impl.DownloadManagerStateImpl
- All Implemented Interfaces:
ParameterListener
,DownloadManagerState
public class DownloadManagerStateImpl
extends Object
implements DownloadManagerState, ParameterListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
protected static class
(package private) static class
Nested classes/interfaces inherited from interface com.biglybt.core.download.DownloadManagerState
DownloadManagerState.ResumeHistory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final File
private static final String
private Map
private static final String
private static final String
private Category
private static final AEMonitor
private static boolean
private static final Map
private static final Map
private static boolean
private DownloadManagerImpl
private WeakReference
<LinkFileMap> private static final CopyOnWriteMap
<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> private static final CopyOnWriteMap
<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> private static final Map
private static final ArrayList
private final CopyOnWriteMap
<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> private final CopyOnWriteMap
<String, CopyOnWriteList<DownloadManagerStateAttributeListener>> private static final LogIDs
private Map
private static final Random
private boolean
private static final String
private static final String
(package private) static final Map
<HashWrapper, DownloadManagerStateImpl> static boolean
private int
private final AEMonitor
private static final ThreadLocal
private final TorrentUtils.ExtendedTorrent
private static final String
private int
private static final int
private static final int
private static final int
private long
private boolean
Fields inherited from interface com.biglybt.core.download.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_PREFIX, AT_DND_SUBFOLDER, AT_FILE_ALLOC_ORDER, AT_FILE_ALLOC_REQUEST, AT_FILE_ALLOC_STRATEGY, AT_FILE_DOWNLOADED, AT_FILE_FLAGS, AT_FILE_LINKS_DEPRECATED, 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, AT_PRIMARY_FILE_IDX, 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_PIECE, AT_SHARE_RATIO_PROGRESS, 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, ATTRIBUTE_DEFAULTS, DEFAULT_MAX_UPLOADS, DEFAULT_UPLOAD_PRIORITY, FAS_DEFAULT, 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
ConstructorsModifierConstructorDescriptionprotected
DownloadManagerStateImpl
(DownloadManagerImpl _download_manager, TorrentUtils.ExtendedTorrent _torrent) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addGlobalListener
(DownloadManagerStateAttributeListener l, String attribute, int event_type) void
addListener
(DownloadManagerStateAttributeListener l, String attribute, int event_type) void
void
void
private static void
copyTorrentToActive
(TOTorrent torrent_file, File state_file, boolean was_corrupt) void
delete()
deletes the saved statestatic void
deleteDownloadState
(byte[] download_hash, boolean delete_cache) static void
deleteDownloadState
(File source_dir, byte[] download_hash) void
static void
void
dump
(IndentWriter writer) boolean
exportState
(File target_dir) void
generateEvidence
(IndentWriter writer, boolean full) boolean
getAttribute
(String name) boolean
getBooleanAttribute
(String name) boolean
getBooleanParameter
(String name) static Boolean
private static Object
getDefaultOverride
(String name, Object value) static DownloadManagerState
private static DownloadManagerStateImpl
getDownloadState
(DownloadManagerImpl download_manager, TOTorrent original_torrent, TorrentUtils.ExtendedTorrent target_torrent) protected static DownloadManagerState
getDownloadState
(DownloadManagerImpl download_manager, String torrent_file, byte[] torrent_hash, boolean inactive) static DownloadManagerState
getDownloadState
(TOTorrent original_torrent) int
getFileFlags
(int file_index) getFileLink
(int source_index, File link_source) returns a File -> File map of the defined links (empty if no links)private LinkFileMap
boolean
getFlag
(long flag) long
getFlags()
protected static File
int
getIntAttribute
(String name) int
getIntParameter
(String name) static Integer
getIntParameterDefault
(String name) String[]
getListAttribute
(String attribute_name) getListAttribute
(String name, int idx) protected List
getListAttributeSupport
(String attribute_name) long
getLongAttribute
(String attribute_name) long
getLongParameter
(String name) getMapAttribute
(String attribute_name) String[]
String[]
Ordered by time, most recent lastprotected static File
getStateFile
(byte[] torrent_hash) protected String
getStringAttribute
(String attribute_name) getTransientAttribute
(String name) boolean
getTransientFlag
(long flag) long
boolean
hasAttribute
(String name) static void
importDownloadState
(File source_dir, byte[] download_hash) protected void
informWillRead
(String attribute_name) protected void
informWritten
(String attribute_name) boolean
isNetworkEnabled
(String network) boolean
boolean
isPeerSourceEnabled
(String peerSource) boolean
isPeerSourcePermitted
(String peerSource) boolean
static void
protected void
mergeTorrentDetails
(TOTorrent other_torrent) void
parameterChanged
(String parameterName) Called, when a parameter has changed.boolean
parameterExists
(String name) void
removeAttribute
(String attribute_name) static void
removeGlobalListener
(DownloadManagerStateAttributeListener l, String attribute, int event_type) void
removeListener
(DownloadManagerStateAttributeListener l, String attribute, int event_type) void
void
save
(boolean interim) static void
protected void
saveSupport
(boolean interim, boolean force) void
setActive
(boolean active) void
setAttribute
(String name, String value) void
setAttribute
(String name, String value, boolean set_dirty) void
setBooleanAttribute
(String name, boolean value) void
setBooleanParameter
(String name, boolean value) void
setCategory
(Category cat) static void
setDebugOn
(boolean on) private void
setDirty
(boolean slightly) void
setDisplayName
(String value) protected void
void
setFileFlags
(int file_index, int flags) void
setFileLink
(int source_index, File link_source, File link_destination) void
void
setFlag
(long flag, boolean set) void
setIntAttribute
(String name, int value) void
setIntParameter
(String name, int value) void
setListAttribute
(String name, String[] values) protected void
setListAttribute
(String attribute_name, List attribute_value) void
setLongAttribute
(String attribute_name, long attribute_value) void
setLongParameter
(String name, long value) void
setMapAttribute
(String attribute_name, Map attribute_value) protected void
setMapAttribute
(String attribute_name, Map attribute_value, boolean disable_change_notification) void
setNetworkEnabled
(String network, boolean enabled) void
setNetworks
(String[] networks) void
setParameterDefault
(String name) Reset to default valuevoid
setPeerSourceEnabled
(String source, boolean enabled) void
setPeerSourcePermitted
(String peerSource, boolean enabled) void
setPeerSources
(String[] ps) void
private void
void
setResumeData
(Map new_data) protected void
setStringAttribute
(String attribute_name, String attribute_value, boolean set_dirty) void
setTrackerClientExtensions
(String value) void
setTrackerResponseCache
(Map value) void
setTransientAttribute
(String name, Object value) void
setTransientFlag
(long flag, boolean set) void
setUserComment
(String value) void
suppressStateSave
(boolean suppress) This method should only be invoked in matching try-finally pairs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.core.download.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
-
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 -
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:ParameterListener
Called, 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:
parameterChanged
in interfaceParameterListener
- Parameters:
parameterName
- the name of the parameter that has changed
-
getDownloadManager
- Specified by:
getDownloadManager
in interfaceDownloadManagerState
-
setDownloadManager
-
getStateFile
- Specified by:
getStateFile
in interfaceDownloadManagerState
-
setRecovered
private void setRecovered() -
getAndClearRecoveredStatus
public boolean getAndClearRecoveredStatus()- Specified by:
getAndClearRecoveredStatus
in interfaceDownloadManagerState
-
clearTrackerResponseCache
public void clearTrackerResponseCache()- Specified by:
clearTrackerResponseCache
in interfaceDownloadManagerState
-
getTrackerResponseCache
- Specified by:
getTrackerResponseCache
in interfaceDownloadManagerState
-
setTrackerResponseCache
- Specified by:
setTrackerResponseCache
in interfaceDownloadManagerState
-
getResumeData
- Specified by:
getResumeData
in interfaceDownloadManagerState
-
clearResumeData
public void clearResumeData()- Specified by:
clearResumeData
in interfaceDownloadManagerState
-
setResumeData
- Specified by:
setResumeData
in interfaceDownloadManagerState
-
isResumeDataComplete
public boolean isResumeDataComplete()- Specified by:
isResumeDataComplete
in interfaceDownloadManagerState
-
getResumeDataHistory
Description copied from interface:DownloadManagerState
Ordered by time, most recent last- Specified by:
getResumeDataHistory
in interfaceDownloadManagerState
- Returns:
-
restoreResumeData
- Specified by:
restoreResumeData
in interfaceDownloadManagerState
-
getTorrent
- Specified by:
getTorrent
in interfaceDownloadManagerState
-
setActive
public void setActive(boolean active) - Specified by:
setActive
in interfaceDownloadManagerState
-
discardFluff
public void discardFluff()- Specified by:
discardFluff
in interfaceDownloadManagerState
-
exportState
- Specified by:
exportState
in interfaceDownloadManagerState
-
suppressStateSave
public void suppressStateSave(boolean suppress) Description copied from interface:DownloadManagerState
This 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:
suppressStateSave
in 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:
save
in interfaceDownloadManagerState
-
saveSupport
protected void saveSupport(boolean interim, boolean force) -
delete
public void delete()Description copied from interface:DownloadManagerState
deletes the saved state- Specified by:
delete
in interfaceDownloadManagerState
-
mergeTorrentDetails
-
setFlag
public void setFlag(long flag, boolean set) - Specified by:
setFlag
in interfaceDownloadManagerState
-
getFlag
public boolean getFlag(long flag) - Specified by:
getFlag
in interfaceDownloadManagerState
-
getFlags
public long getFlags()- Specified by:
getFlags
in interfaceDownloadManagerState
-
setTransientFlag
public void setTransientFlag(long flag, boolean set) - Specified by:
setTransientFlag
in interfaceDownloadManagerState
-
getTransientFlag
public boolean getTransientFlag(long flag) - Specified by:
getTransientFlag
in interfaceDownloadManagerState
-
getTransientFlags
public long getTransientFlags()- Specified by:
getTransientFlags
in interfaceDownloadManagerState
-
getTransientAttribute
- Specified by:
getTransientAttribute
in interfaceDownloadManagerState
-
setTransientAttribute
- Specified by:
setTransientAttribute
in interfaceDownloadManagerState
-
parameterExists
- Specified by:
parameterExists
in interfaceDownloadManagerState
- Parameters:
name
-- Returns:
-
setParameterDefault
Description copied from interface:DownloadManagerState
Reset to default value- Specified by:
setParameterDefault
in interfaceDownloadManagerState
- Parameters:
name
-
-
getLongParameter
- Specified by:
getLongParameter
in interfaceDownloadManagerState
-
setLongParameter
- Specified by:
setLongParameter
in interfaceDownloadManagerState
-
getIntParameter
- Specified by:
getIntParameter
in interfaceDownloadManagerState
-
setIntParameter
- Specified by:
setIntParameter
in interfaceDownloadManagerState
-
getBooleanParameter
- Specified by:
getBooleanParameter
in interfaceDownloadManagerState
-
setBooleanParameter
- Specified by:
setBooleanParameter
in interfaceDownloadManagerState
-
setAttribute
- Specified by:
setAttribute
in interfaceDownloadManagerState
-
setAttribute
- Specified by:
setAttribute
in interfaceDownloadManagerState
-
getAttribute
- Specified by:
getAttribute
in interfaceDownloadManagerState
-
getCategory
- Specified by:
getCategory
in interfaceDownloadManagerState
-
setCategory
- Specified by:
setCategory
in interfaceDownloadManagerState
-
getTrackerClientExtensions
- Specified by:
getTrackerClientExtensions
in interfaceDownloadManagerState
-
setTrackerClientExtensions
- Specified by:
setTrackerClientExtensions
in interfaceDownloadManagerState
-
getDisplayName
- Specified by:
getDisplayName
in interfaceDownloadManagerState
-
setDisplayName
- Specified by:
setDisplayName
in interfaceDownloadManagerState
-
getUserComment
- Specified by:
getUserComment
in interfaceDownloadManagerState
-
setUserComment
- Specified by:
setUserComment
in interfaceDownloadManagerState
-
getRelativeSavePath
- Specified by:
getRelativeSavePath
in interfaceDownloadManagerState
-
getPrimaryFile
- Specified by:
getPrimaryFile
in interfaceDownloadManagerState
-
setPrimaryFile
- Specified by:
setPrimaryFile
in interfaceDownloadManagerState
- Parameters:
dmfi
-
-
getNetworks
- Specified by:
getNetworks
in interfaceDownloadManagerState
-
isNetworkEnabled
- Specified by:
isNetworkEnabled
in interfaceDownloadManagerState
-
setNetworks
- Specified by:
setNetworks
in interfaceDownloadManagerState
-
setNetworkEnabled
- Specified by:
setNetworkEnabled
in interfaceDownloadManagerState
-
getPeerSources
- Specified by:
getPeerSources
in interfaceDownloadManagerState
-
isPeerSourceEnabled
- Specified by:
isPeerSourceEnabled
in interfaceDownloadManagerState
-
isPeerSourcePermitted
- Specified by:
isPeerSourcePermitted
in interfaceDownloadManagerState
-
setPeerSourcePermitted
- Specified by:
setPeerSourcePermitted
in interfaceDownloadManagerState
-
setPeerSources
- Specified by:
setPeerSources
in interfaceDownloadManagerState
-
setPeerSourceEnabled
- Specified by:
setPeerSourceEnabled
in interfaceDownloadManagerState
-
setFileLink
- Specified by:
setFileLink
in interfaceDownloadManagerState
-
setFileLinks
public void setFileLinks(List<Integer> source_indexes, List<File> link_sources, List<File> link_destinations) - Specified by:
setFileLinks
in interfaceDownloadManagerState
-
clearFileLinks
public void clearFileLinks()- Specified by:
clearFileLinks
in interfaceDownloadManagerState
-
getFileLink
- Specified by:
getFileLink
in interfaceDownloadManagerState
-
getFileLinks
Description copied from interface:DownloadManagerState
returns a File -> File map of the defined links (empty if no links)- Specified by:
getFileLinks
in interfaceDownloadManagerState
- Returns:
-
getFileLinksSupport
-
getFileFlags
public int getFileFlags(int file_index) - Specified by:
getFileFlags
in interfaceDownloadManagerState
-
setFileFlags
public void setFileFlags(int file_index, int flags) - Specified by:
setFileFlags
in interfaceDownloadManagerState
-
isOurContent
public boolean isOurContent()- Specified by:
isOurContent
in interfaceDownloadManagerState
- Returns:
-
getStringAttribute
-
setStringAttribute
-
getLongAttribute
- Specified by:
getLongAttribute
in interfaceDownloadManagerState
-
setLongAttribute
- Specified by:
setLongAttribute
in interfaceDownloadManagerState
-
setListAttribute
- Specified by:
setListAttribute
in interfaceDownloadManagerState
-
getListAttribute
- Specified by:
getListAttribute
in interfaceDownloadManagerState
-
getListAttribute
- Specified by:
getListAttribute
in interfaceDownloadManagerState
-
getListAttributeSupport
-
setListAttribute
-
getMapAttribute
- Specified by:
getMapAttribute
in interfaceDownloadManagerState
-
setMapAttribute
- Specified by:
setMapAttribute
in interfaceDownloadManagerState
-
setMapAttribute
-
hasAttribute
- Specified by:
hasAttribute
in interfaceDownloadManagerState
-
removeAttribute
- Specified by:
removeAttribute
in interfaceDownloadManagerState
-
setIntAttribute
- Specified by:
setIntAttribute
in interfaceDownloadManagerState
-
getIntAttribute
- Specified by:
getIntAttribute
in interfaceDownloadManagerState
-
setBooleanAttribute
- Specified by:
setBooleanAttribute
in interfaceDownloadManagerState
-
getBooleanAttribute
- Specified by:
getBooleanAttribute
in interfaceDownloadManagerState
-
getDownloadState
-
informWritten
-
informWillRead
-
addListener
- Specified by:
addListener
in interfaceDownloadManagerState
- Parameters:
l
- Listener to fireattribute
- attribute to listen for (null for all)event_type
-DownloadManagerStateAttributeListener.WILL_BE_READ
orDownloadManagerStateAttributeListener.WRITTEN
-
removeListener
public void removeListener(DownloadManagerStateAttributeListener l, String attribute, int event_type) - Specified by:
removeListener
in 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:
generateEvidence
in interfaceDownloadManagerState
-
dump
- Specified by:
dump
in interfaceDownloadManagerState
-