com.aelitis.azureus.core.subs.impl
Class SubscriptionManagerImpl
java.lang.Object
com.aelitis.azureus.core.subs.impl.SubscriptionManagerImpl
- All Implemented Interfaces:
- SubscriptionManager, AEDiagnosticsEvidenceGenerator, UtilitiesImpl.PluginSubscriptionManager
public class SubscriptionManagerImpl
- extends java.lang.Object
- implements SubscriptionManager, AEDiagnosticsEvidenceGenerator
Method Summary |
void |
addListener(SubscriptionManagerListener listener)
|
protected void |
addMetaSearchListener()
|
protected void |
addPotentialAssociation(SubscriptionImpl subs,
java.lang.String result_id,
java.lang.String key)
|
protected void |
addPrepareTrigger(byte[] hash,
Subscription[] subs,
SubscriptionResult[] results)
|
protected SubscriptionImpl |
addSubscription(SubscriptionImpl subs)
|
protected boolean |
askIfCanUpgrade(SubscriptionImpl subs,
int new_version)
|
protected void |
associationAdded(SubscriptionImpl subscription,
byte[] association_hash)
|
protected void |
associationLookupComplete()
|
protected void |
changeSubscription(SubscriptionImpl subs)
|
protected void |
checkInitialDownload(SubscriptionImpl subs)
|
protected void |
checkMaxResults(int max)
|
protected void |
checkPotentialAssociations(byte[] hash,
java.lang.String key)
|
protected void |
checkServerPublications(java.util.List subs)
|
protected void |
checkSingletonPublish(SubscriptionImpl subs)
|
protected void |
checkStuff(int ticks)
|
protected void |
checkUpgrade(SubscriptionImpl sub)
|
protected void |
checkURL(java.net.URL url)
|
protected void |
configDirty()
|
protected void |
configDirty(SubscriptionImpl subs)
|
Subscription |
create(java.lang.String name,
boolean public_subs,
java.lang.String json)
|
Subscription |
createFromURI(java.lang.String uri)
|
Subscription |
createRSS(java.lang.String name,
java.net.URL url,
int check_interval_mins,
boolean is_anonymous,
java.util.Map user_data)
|
Subscription |
createRSS(java.lang.String name,
java.net.URL url,
int check_interval_mins,
java.util.Map user_data)
|
Subscription |
createSingletonRSS(java.lang.String name,
java.net.URL url,
int check_interval_mins,
boolean is_anon)
|
protected Subscription |
createSingletonRSSSupport(java.lang.String name,
java.net.URL url,
boolean is_public,
int check_interval_mins,
boolean is_anon,
int add_type,
boolean subscribe)
|
protected SubscriptionImpl |
createSingletonSubscription(java.util.Map singleton_details,
int add_type,
boolean subscribe)
|
protected java.util.Map |
decodeSubscriptionDetails(byte[] data)
|
protected void |
downloadSubscription(byte[] association_hash,
byte[] torrent_hash,
byte[] sid,
int version,
int size,
com.aelitis.azureus.core.subs.impl.SubscriptionManagerImpl.subsLookupListener listener)
|
protected void |
downloadSubscription(TOTorrent torrent,
java.net.InetSocketAddress peer,
byte[] subs_id,
int version,
java.lang.String name,
SubscriptionManagerImpl.downloadListener listener)
|
protected java.lang.Object[] |
downloadTorrent(byte[] hash,
int update_size)
|
protected byte[] |
encodeSubscriptionDetails(SubscriptionImpl subs)
|
void |
generate(IndentWriter writer)
|
boolean |
getActivateSubscriptionOnChange()
|
int |
getAutoDownloadMarkReadAfterDays()
|
boolean |
getAutoStartDownloads()
|
int |
getAutoStartMaxMB()
|
int |
getAutoStartMinMB()
|
protected Engine |
getEngine(SubscriptionImpl subs,
java.util.Map json_map,
boolean local_only)
|
int |
getKnownSubscriptionCount()
|
Subscription[] |
getKnownSubscriptions(byte[] hash)
Cached view of hash's subs |
Subscription[] |
getLinkedSubscriptions(byte[] hash)
|
protected MagnetPlugin |
getMagnetPlugin()
|
int |
getMaxNonDeletedResults()
|
protected void |
getPopularity(SubscriptionImpl subs,
SubscriptionPopularityListener listener)
|
protected void |
getPopularityFromDHT(SubscriptionImpl subs,
SubscriptionPopularityListener listener,
boolean sync)
|
protected void |
getPopularitySupport(DHTPluginInterface dht_plugin,
SubscriptionImpl subs,
SubscriptionPopularityListener _listener,
boolean sync)
|
java.lang.String |
getRateLimits()
|
protected java.io.File |
getResultsFile(SubscriptionImpl subs)
|
java.lang.String |
getRSSLink()
|
SubscriptionScheduler |
getScheduler()
|
protected java.lang.Object[] |
getSearchTemplateVuzeFile(SubscriptionImpl sub)
|
static SubscriptionManager |
getSingleton(boolean stand_alone)
|
protected java.util.Map |
getSingletonMap(java.lang.String name,
java.net.URL url,
boolean is_public,
int check_interval_mins,
boolean is_anon)
|
Subscription |
getSubscriptionByID(java.lang.String id)
|
int |
getSubscriptionCount(boolean subscribed_only)
|
protected int |
getSubscriptionDownloadCount()
|
protected SubscriptionImpl |
getSubscriptionFromName(java.lang.String name)
|
protected SubscriptionImpl |
getSubscriptionFromPlatform(byte[] sid,
boolean is_anon,
int add_type)
|
protected SubscriptionImpl |
getSubscriptionFromSID(byte[] sid)
|
protected SubscriptionImpl |
getSubscriptionFromVuzeFile(byte[] sid,
int add_type,
java.io.File file)
|
protected SubscriptionImpl |
getSubscriptionFromVuzeFile(byte[] sid,
int add_type,
VuzeFile vf)
|
protected SubscriptionImpl |
getSubscriptionFromVuzeFileContent(byte[] sid,
int add_type,
java.lang.String content)
|
Subscription[] |
getSubscriptions()
|
Subscription[] |
getSubscriptions(boolean subscribed_only)
|
protected java.io.File |
getSubsDir()
|
protected java.lang.String |
getUniqueName(java.lang.String name)
|
protected java.io.File |
getVuzeFile(SubscriptionImpl subs)
|
boolean |
hideSearchTemplates()
|
Subscription |
importSubscription(int type,
java.util.Map map,
boolean warn_user)
|
protected void |
initialise()
|
protected void |
initWithCore(AzureusCore _core)
|
boolean |
isRSSPublishEnabled()
|
boolean |
isSearchEnabled()
|
boolean |
isSearchTemplateImportable(SubscriptionImpl sub)
|
boolean |
isSubsDownloadEnabled()
|
protected boolean |
isVisible(SubscriptionImpl subs)
|
protected java.util.LinkedHashMap<java.lang.String,SubscriptionResultImpl> |
loadResults(SubscriptionImpl subs)
|
void |
log(java.lang.String s)
|
void |
log(java.lang.String s,
java.lang.Throwable e)
|
protected void |
lookupAssociations(boolean high_priority)
|
SubscriptionAssociationLookup |
lookupAssociations(byte[] hash,
java.lang.String[] networks,
SubscriptionLookupListener listener)
|
SubscriptionAssociationLookup |
lookupAssociations(byte[] hash,
SubscriptionLookupListener listener)
Full lookup |
protected SubscriptionAssociationLookup |
lookupAssociationsSupport(DHTPluginInterface dht_plugin,
byte[] hash,
SubscriptionLookupListener _listener)
|
protected SubscriptionImpl |
lookupSingletonRSS(java.lang.String name,
java.net.URL url,
boolean is_public,
int check_interval_mins,
boolean is_anon)
|
protected void |
lookupSubscription(byte[] association_hash,
byte[] sid,
int version,
boolean is_anon,
com.aelitis.azureus.core.subs.impl.SubscriptionManagerImpl.subsLookupListener listener)
|
static void |
main(java.lang.String[] args)
|
static void |
preInitialise()
|
protected void |
prepareDownload(Download download,
Subscription[] subscriptions,
SubscriptionResult[] results)
|
protected void |
publishSubscription(SubscriptionImpl subs)
|
protected void |
publishSubscriptions()
|
protected void |
recordAssociations(byte[] association_hash,
SubscriptionImpl[] subscriptions,
boolean full_lookup)
|
protected boolean |
recordAssociationsSupport(byte[] association_hash,
SubscriptionImpl[] subscriptions,
boolean full_lookup)
|
protected boolean |
recoverSubscriptionUpdate(Download download,
java.util.Map rd)
|
protected void |
removeDownload(Download download,
boolean remove_data)
|
void |
removeListener(SubscriptionManagerListener listener)
|
protected void |
removePrepareTrigger(byte[] hash)
|
protected void |
removeSubscription(SubscriptionImpl subs)
|
void |
requestSubscription(SearchProvider sp,
java.util.Map<java.lang.String,java.lang.Object> search_parameters)
|
void |
requestSubscription(java.net.URL url,
java.util.Map<java.lang.String,java.lang.Object> options)
|
protected void |
saveConfig()
|
protected void |
saveResults(SubscriptionImpl subs,
SubscriptionResultImpl[] results)
|
SearchInstance |
searchSubscriptions(java.util.Map<java.lang.String,java.lang.Object> search_parameters,
SearchObserver observer)
|
protected void |
selectSubscription(SubscriptionImpl subs)
|
void |
setActivateSubscriptionOnChange(boolean b)
|
void |
setAutoDownloadMarkReadAfterDays(int days)
|
void |
setAutoStartDownloads(boolean auto_start)
|
void |
setAutoStartMaxMB(int mb)
|
void |
setAutoStartMinMB(int mb)
|
protected void |
setCategoryOnExisting(SubscriptionImpl subscription,
java.lang.String old_category,
java.lang.String new_category)
|
void |
setMaxNonDeletedResults(int max)
|
void |
setRateLimits(java.lang.String limits)
|
void |
setRSSPublishEnabled(boolean enabled)
|
void |
setSearchEnabled(boolean enabled)
|
protected void |
setSelected(java.util.List subs)
|
protected void |
setSelected(SubscriptionImpl sub)
|
void |
setSubsDownloadEnabled(boolean enabled)
|
protected boolean |
shouldAutoStart(Torrent torrent)
|
protected boolean |
subscriptionExists(Download download,
SubscriptionImpl subs)
|
protected void |
subscriptionUpdated()
|
protected void |
tidyPotentialAssociations()
|
protected void |
updatePopularityFromDHT(SubscriptionImpl subs,
boolean sync)
|
protected void |
updatePublicSubscription(SubscriptionImpl subs)
|
protected void |
updateSubscription(SubscriptionImpl subs,
Download download,
java.io.File torrent_file,
java.io.File data_file)
|
protected void |
updateSubscription(SubscriptionImpl subs,
java.io.File data_location)
|
protected void |
updateSubscription(SubscriptionImpl subs,
int new_version)
|
protected void |
updateSubscription(SubscriptionImpl subs,
int update_version,
byte[] update_hash,
int update_size)
|
protected void |
updateSubscription(SubscriptionImpl subs,
int new_version,
TOTorrent torrent,
java.net.InetSocketAddress peer)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SubscriptionManagerImpl
protected SubscriptionManagerImpl(boolean stand_alone)
preInitialise
public static void preInitialise()
getSingleton
public static SubscriptionManager getSingleton(boolean stand_alone)
initialise
protected void initialise()
initWithCore
protected void initWithCore(AzureusCore _core)
getSearchTemplateVuzeFile
protected java.lang.Object[] getSearchTemplateVuzeFile(SubscriptionImpl sub)
isSearchTemplateImportable
public boolean isSearchTemplateImportable(SubscriptionImpl sub)
searchSubscriptions
public SearchInstance searchSubscriptions(java.util.Map<java.lang.String,java.lang.Object> search_parameters,
SearchObserver observer)
throws SearchException
- Throws:
SearchException
checkMaxResults
protected void checkMaxResults(int max)
getScheduler
public SubscriptionScheduler getScheduler()
- Specified by:
getScheduler
in interface SubscriptionManager
isRSSPublishEnabled
public boolean isRSSPublishEnabled()
- Specified by:
isRSSPublishEnabled
in interface SubscriptionManager
setRSSPublishEnabled
public void setRSSPublishEnabled(boolean enabled)
- Specified by:
setRSSPublishEnabled
in interface SubscriptionManager
isSearchEnabled
public boolean isSearchEnabled()
- Specified by:
isSearchEnabled
in interface SubscriptionManager
setSearchEnabled
public void setSearchEnabled(boolean enabled)
- Specified by:
setSearchEnabled
in interface SubscriptionManager
hideSearchTemplates
public boolean hideSearchTemplates()
- Specified by:
hideSearchTemplates
in interface SubscriptionManager
isSubsDownloadEnabled
public boolean isSubsDownloadEnabled()
- Specified by:
isSubsDownloadEnabled
in interface SubscriptionManager
setSubsDownloadEnabled
public void setSubsDownloadEnabled(boolean enabled)
- Specified by:
setSubsDownloadEnabled
in interface SubscriptionManager
setRateLimits
public void setRateLimits(java.lang.String limits)
- Specified by:
setRateLimits
in interface SubscriptionManager
getRateLimits
public java.lang.String getRateLimits()
- Specified by:
getRateLimits
in interface SubscriptionManager
setActivateSubscriptionOnChange
public void setActivateSubscriptionOnChange(boolean b)
- Specified by:
setActivateSubscriptionOnChange
in interface SubscriptionManager
getActivateSubscriptionOnChange
public boolean getActivateSubscriptionOnChange()
- Specified by:
getActivateSubscriptionOnChange
in interface SubscriptionManager
getRSSLink
public java.lang.String getRSSLink()
- Specified by:
getRSSLink
in interface SubscriptionManager
create
public Subscription create(java.lang.String name,
boolean public_subs,
java.lang.String json)
throws SubscriptionException
- Specified by:
create
in interface SubscriptionManager
- Throws:
SubscriptionException
createSingletonRSS
public Subscription createSingletonRSS(java.lang.String name,
java.net.URL url,
int check_interval_mins,
boolean is_anon)
throws SubscriptionException
- Specified by:
createSingletonRSS
in interface SubscriptionManager
- Throws:
SubscriptionException
createFromURI
public Subscription createFromURI(java.lang.String uri)
throws SubscriptionException
- Specified by:
createFromURI
in interface SubscriptionManager
- Throws:
SubscriptionException
lookupSingletonRSS
protected SubscriptionImpl lookupSingletonRSS(java.lang.String name,
java.net.URL url,
boolean is_public,
int check_interval_mins,
boolean is_anon)
throws SubscriptionException
- Throws:
SubscriptionException
createSingletonRSSSupport
protected Subscription createSingletonRSSSupport(java.lang.String name,
java.net.URL url,
boolean is_public,
int check_interval_mins,
boolean is_anon,
int add_type,
boolean subscribe)
throws SubscriptionException
- Throws:
SubscriptionException
getUniqueName
protected java.lang.String getUniqueName(java.lang.String name)
getSingletonMap
protected java.util.Map getSingletonMap(java.lang.String name,
java.net.URL url,
boolean is_public,
int check_interval_mins,
boolean is_anon)
throws SubscriptionException
- Throws:
SubscriptionException
createSingletonSubscription
protected SubscriptionImpl createSingletonSubscription(java.util.Map singleton_details,
int add_type,
boolean subscribe)
throws SubscriptionException
- Throws:
SubscriptionException
requestSubscription
public void requestSubscription(java.net.URL url,
java.util.Map<java.lang.String,java.lang.Object> options)
- Specified by:
requestSubscription
in interface UtilitiesImpl.PluginSubscriptionManager
requestSubscription
public void requestSubscription(SearchProvider sp,
java.util.Map<java.lang.String,java.lang.Object> search_parameters)
throws SubscriptionException
- Specified by:
requestSubscription
in interface UtilitiesImpl.PluginSubscriptionManager
- Throws:
SubscriptionException
createRSS
public Subscription createRSS(java.lang.String name,
java.net.URL url,
int check_interval_mins,
java.util.Map user_data)
throws SubscriptionException
- Specified by:
createRSS
in interface SubscriptionManager
- Throws:
SubscriptionException
createRSS
public Subscription createRSS(java.lang.String name,
java.net.URL url,
int check_interval_mins,
boolean is_anonymous,
java.util.Map user_data)
throws SubscriptionException
- Specified by:
createRSS
in interface SubscriptionManager
- Throws:
SubscriptionException
checkURL
protected void checkURL(java.net.URL url)
throws SubscriptionException
- Throws:
SubscriptionException
addSubscription
protected SubscriptionImpl addSubscription(SubscriptionImpl subs)
addMetaSearchListener
protected void addMetaSearchListener()
changeSubscription
protected void changeSubscription(SubscriptionImpl subs)
selectSubscription
protected void selectSubscription(SubscriptionImpl subs)
removeSubscription
protected void removeSubscription(SubscriptionImpl subs)
updatePublicSubscription
protected void updatePublicSubscription(SubscriptionImpl subs)
checkSingletonPublish
protected void checkSingletonPublish(SubscriptionImpl subs)
throws SubscriptionException
- Throws:
SubscriptionException
checkServerPublications
protected void checkServerPublications(java.util.List subs)
checkStuff
protected void checkStuff(int ticks)
importSubscription
public Subscription importSubscription(int type,
java.util.Map map,
boolean warn_user)
throws SubscriptionException
- Throws:
SubscriptionException
getSubscriptions
public Subscription[] getSubscriptions()
- Specified by:
getSubscriptions
in interface SubscriptionManager
getSubscriptions
public Subscription[] getSubscriptions(boolean subscribed_only)
- Specified by:
getSubscriptions
in interface SubscriptionManager
- Specified by:
getSubscriptions
in interface UtilitiesImpl.PluginSubscriptionManager
getSubscriptionCount
public int getSubscriptionCount(boolean subscribed_only)
- Specified by:
getSubscriptionCount
in interface SubscriptionManager
getSubscriptionFromName
protected SubscriptionImpl getSubscriptionFromName(java.lang.String name)
getSubscriptionByID
public Subscription getSubscriptionByID(java.lang.String id)
- Specified by:
getSubscriptionByID
in interface SubscriptionManager
getSubscriptionFromSID
protected SubscriptionImpl getSubscriptionFromSID(byte[] sid)
getSubsDir
protected java.io.File getSubsDir()
throws java.io.IOException
- Throws:
java.io.IOException
getVuzeFile
protected java.io.File getVuzeFile(SubscriptionImpl subs)
throws java.io.IOException
- Throws:
java.io.IOException
getResultsFile
protected java.io.File getResultsFile(SubscriptionImpl subs)
throws java.io.IOException
- Throws:
java.io.IOException
getKnownSubscriptionCount
public int getKnownSubscriptionCount()
- Specified by:
getKnownSubscriptionCount
in interface SubscriptionManager
getKnownSubscriptions
public Subscription[] getKnownSubscriptions(byte[] hash)
- Description copied from interface:
SubscriptionManager
- Cached view of hash's subs
- Specified by:
getKnownSubscriptions
in interface SubscriptionManager
- Returns:
subscriptionExists
protected boolean subscriptionExists(Download download,
SubscriptionImpl subs)
isVisible
protected boolean isVisible(SubscriptionImpl subs)
getLinkedSubscriptions
public Subscription[] getLinkedSubscriptions(byte[] hash)
- Specified by:
getLinkedSubscriptions
in interface SubscriptionManager
lookupAssociations
protected void lookupAssociations(boolean high_priority)
associationLookupComplete
protected void associationLookupComplete()
setSelected
protected void setSelected(java.util.List subs)
checkUpgrade
protected void checkUpgrade(SubscriptionImpl sub)
setSelected
protected void setSelected(SubscriptionImpl sub)
checkInitialDownload
protected void checkInitialDownload(SubscriptionImpl subs)
lookupAssociations
public SubscriptionAssociationLookup lookupAssociations(byte[] hash,
java.lang.String[] networks,
SubscriptionLookupListener listener)
throws SubscriptionException
- Specified by:
lookupAssociations
in interface SubscriptionManager
- Throws:
SubscriptionException
lookupAssociations
public SubscriptionAssociationLookup lookupAssociations(byte[] hash,
SubscriptionLookupListener listener)
throws SubscriptionException
- Description copied from interface:
SubscriptionManager
- Full lookup
- Specified by:
lookupAssociations
in interface SubscriptionManager
- Returns:
-
- Throws:
SubscriptionException
lookupAssociationsSupport
protected SubscriptionAssociationLookup lookupAssociationsSupport(DHTPluginInterface dht_plugin,
byte[] hash,
SubscriptionLookupListener _listener)
throws SubscriptionException
- Throws:
SubscriptionException
getPopularity
protected void getPopularity(SubscriptionImpl subs,
SubscriptionPopularityListener listener)
throws SubscriptionException
- Throws:
SubscriptionException
getPopularityFromDHT
protected void getPopularityFromDHT(SubscriptionImpl subs,
SubscriptionPopularityListener listener,
boolean sync)
updatePopularityFromDHT
protected void updatePopularityFromDHT(SubscriptionImpl subs,
boolean sync)
getPopularitySupport
protected void getPopularitySupport(DHTPluginInterface dht_plugin,
SubscriptionImpl subs,
SubscriptionPopularityListener _listener,
boolean sync)
lookupSubscription
protected void lookupSubscription(byte[] association_hash,
byte[] sid,
int version,
boolean is_anon,
com.aelitis.azureus.core.subs.impl.SubscriptionManagerImpl.subsLookupListener listener)
getSubscriptionFromPlatform
protected SubscriptionImpl getSubscriptionFromPlatform(byte[] sid,
boolean is_anon,
int add_type)
throws SubscriptionException
- Throws:
SubscriptionException
getSubscriptionFromVuzeFile
protected SubscriptionImpl getSubscriptionFromVuzeFile(byte[] sid,
int add_type,
java.io.File file)
throws SubscriptionException
- Throws:
SubscriptionException
getSubscriptionFromVuzeFileContent
protected SubscriptionImpl getSubscriptionFromVuzeFileContent(byte[] sid,
int add_type,
java.lang.String content)
throws SubscriptionException
- Throws:
SubscriptionException
getSubscriptionFromVuzeFile
protected SubscriptionImpl getSubscriptionFromVuzeFile(byte[] sid,
int add_type,
VuzeFile vf)
throws SubscriptionException
- Throws:
SubscriptionException
downloadSubscription
protected void downloadSubscription(byte[] association_hash,
byte[] torrent_hash,
byte[] sid,
int version,
int size,
com.aelitis.azureus.core.subs.impl.SubscriptionManagerImpl.subsLookupListener listener)
getSubscriptionDownloadCount
protected int getSubscriptionDownloadCount()
associationAdded
protected void associationAdded(SubscriptionImpl subscription,
byte[] association_hash)
addPotentialAssociation
protected void addPotentialAssociation(SubscriptionImpl subs,
java.lang.String result_id,
java.lang.String key)
checkPotentialAssociations
protected void checkPotentialAssociations(byte[] hash,
java.lang.String key)
tidyPotentialAssociations
protected void tidyPotentialAssociations()
recordAssociations
protected void recordAssociations(byte[] association_hash,
SubscriptionImpl[] subscriptions,
boolean full_lookup)
addPrepareTrigger
protected void addPrepareTrigger(byte[] hash,
Subscription[] subs,
SubscriptionResult[] results)
removePrepareTrigger
protected void removePrepareTrigger(byte[] hash)
prepareDownload
protected void prepareDownload(Download download,
Subscription[] subscriptions,
SubscriptionResult[] results)
recordAssociationsSupport
protected boolean recordAssociationsSupport(byte[] association_hash,
SubscriptionImpl[] subscriptions,
boolean full_lookup)
subscriptionUpdated
protected void subscriptionUpdated()
publishSubscriptions
protected void publishSubscriptions()
publishSubscription
protected void publishSubscription(SubscriptionImpl subs)
updateSubscription
protected void updateSubscription(SubscriptionImpl subs,
int new_version)
encodeSubscriptionDetails
protected byte[] encodeSubscriptionDetails(SubscriptionImpl subs)
throws java.io.IOException
- Throws:
java.io.IOException
decodeSubscriptionDetails
protected java.util.Map decodeSubscriptionDetails(byte[] data)
throws java.io.IOException
- Throws:
java.io.IOException
updateSubscription
protected void updateSubscription(SubscriptionImpl subs,
int update_version,
byte[] update_hash,
int update_size)
downloadTorrent
protected java.lang.Object[] downloadTorrent(byte[] hash,
int update_size)
downloadSubscription
protected void downloadSubscription(TOTorrent torrent,
java.net.InetSocketAddress peer,
byte[] subs_id,
int version,
java.lang.String name,
SubscriptionManagerImpl.downloadListener listener)
updateSubscription
protected void updateSubscription(SubscriptionImpl subs,
int new_version,
TOTorrent torrent,
java.net.InetSocketAddress peer)
askIfCanUpgrade
protected boolean askIfCanUpgrade(SubscriptionImpl subs,
int new_version)
recoverSubscriptionUpdate
protected boolean recoverSubscriptionUpdate(Download download,
java.util.Map rd)
updateSubscription
protected void updateSubscription(SubscriptionImpl subs,
Download download,
java.io.File torrent_file,
java.io.File data_file)
removeDownload
protected void removeDownload(Download download,
boolean remove_data)
updateSubscription
protected void updateSubscription(SubscriptionImpl subs,
java.io.File data_location)
getMagnetPlugin
protected MagnetPlugin getMagnetPlugin()
getEngine
protected Engine getEngine(SubscriptionImpl subs,
java.util.Map json_map,
boolean local_only)
throws SubscriptionException
- Throws:
SubscriptionException
loadResults
protected java.util.LinkedHashMap<java.lang.String,SubscriptionResultImpl> loadResults(SubscriptionImpl subs)
setCategoryOnExisting
protected void setCategoryOnExisting(SubscriptionImpl subscription,
java.lang.String old_category,
java.lang.String new_category)
getMaxNonDeletedResults
public int getMaxNonDeletedResults()
- Specified by:
getMaxNonDeletedResults
in interface SubscriptionManager
setMaxNonDeletedResults
public void setMaxNonDeletedResults(int max)
- Specified by:
setMaxNonDeletedResults
in interface SubscriptionManager
getAutoStartDownloads
public boolean getAutoStartDownloads()
- Specified by:
getAutoStartDownloads
in interface SubscriptionManager
setAutoStartDownloads
public void setAutoStartDownloads(boolean auto_start)
- Specified by:
setAutoStartDownloads
in interface SubscriptionManager
getAutoStartMinMB
public int getAutoStartMinMB()
- Specified by:
getAutoStartMinMB
in interface SubscriptionManager
setAutoStartMinMB
public void setAutoStartMinMB(int mb)
- Specified by:
setAutoStartMinMB
in interface SubscriptionManager
getAutoStartMaxMB
public int getAutoStartMaxMB()
- Specified by:
getAutoStartMaxMB
in interface SubscriptionManager
setAutoStartMaxMB
public void setAutoStartMaxMB(int mb)
- Specified by:
setAutoStartMaxMB
in interface SubscriptionManager
getAutoDownloadMarkReadAfterDays
public int getAutoDownloadMarkReadAfterDays()
- Specified by:
getAutoDownloadMarkReadAfterDays
in interface SubscriptionManager
setAutoDownloadMarkReadAfterDays
public void setAutoDownloadMarkReadAfterDays(int days)
- Specified by:
setAutoDownloadMarkReadAfterDays
in interface SubscriptionManager
shouldAutoStart
protected boolean shouldAutoStart(Torrent torrent)
saveResults
protected void saveResults(SubscriptionImpl subs,
SubscriptionResultImpl[] results)
configDirty
protected void configDirty(SubscriptionImpl subs)
configDirty
protected void configDirty()
saveConfig
protected void saveConfig()
log
public void log(java.lang.String s,
java.lang.Throwable e)
log
public void log(java.lang.String s)
addListener
public void addListener(SubscriptionManagerListener listener)
- Specified by:
addListener
in interface SubscriptionManager
removeListener
public void removeListener(SubscriptionManagerListener listener)
- Specified by:
removeListener
in interface SubscriptionManager
generate
public void generate(IndentWriter writer)
- Specified by:
generate
in interface AEDiagnosticsEvidenceGenerator
main
public static void main(java.lang.String[] args)