Class SFPluginDetailsLoaderImpl
- java.lang.Object
-
- com.biglybt.pifimpl.update.sf.impl2.SFPluginDetailsLoaderImpl
-
- All Implemented Interfaces:
ResourceDownloaderListener
,SFPluginDetailsLoader
public class SFPluginDetailsLoaderImpl extends java.lang.Object implements SFPluginDetailsLoader, ResourceDownloaderListener
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
base_url_params
private static AEMonitor
class_mon
protected java.util.List
listeners
private static LogIDs
LOGID
private static java.lang.String
page_url
protected java.util.List
plugin_ids
protected boolean
plugin_ids_loaded
protected long
plugin_ids_loaded_at
protected java.util.Map
plugin_map
protected ResourceDownloaderFactory
rd_factory
private static int
RELOAD_MIN_TIME
private static SFPluginDetailsLoaderImpl
singleton
private static java.lang.String
site_prefix
private static java.lang.String
site_prefix_default
protected AEMonitor
this_mon
-
Constructor Summary
Constructors Modifier Constructor Description protected
SFPluginDetailsLoaderImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
addEPIDS(java.lang.String str)
void
addListener(SFPluginDetailsLoaderListener l)
boolean
completed(ResourceDownloader downloader, java.io.InputStream data)
void
failed(ResourceDownloader downloader, ResourceDownloaderException e)
static java.lang.String
getBaseUrlParams()
SFPluginDetails[]
getPluginDetails()
SFPluginDetails
getPluginDetails(java.lang.String name)
java.lang.String[]
getPluginIDs()
protected java.lang.String
getRelativeURLBase()
static SFPluginDetailsLoader
getSingleton()
protected void
informListeners(java.lang.String log)
protected void
loadPluginDetails(SFPluginDetailsImpl details)
protected void
loadPluginList()
protected boolean
processPluginStream(SFPluginDetailsImpl details, java.io.InputStream is)
void
removeListener(SFPluginDetailsLoaderListener l)
void
reportActivity(ResourceDownloader downloader, java.lang.String activity)
void
reportAmountComplete(ResourceDownloader downloader, long amount)
void
reportPercentComplete(ResourceDownloader downloader, int percentage)
void
reset()
-
-
-
Field Detail
-
LOGID
private static final LogIDs LOGID
-
site_prefix_default
private static final java.lang.String site_prefix_default
- See Also:
- Constant Field Values
-
site_prefix
private static java.lang.String site_prefix
-
base_url_params
private static java.lang.String base_url_params
-
page_url
private static java.lang.String page_url
-
singleton
private static SFPluginDetailsLoaderImpl singleton
-
class_mon
private static AEMonitor class_mon
-
RELOAD_MIN_TIME
private static final int RELOAD_MIN_TIME
- See Also:
- Constant Field Values
-
plugin_ids_loaded
protected boolean plugin_ids_loaded
-
plugin_ids_loaded_at
protected long plugin_ids_loaded_at
-
plugin_ids
protected java.util.List plugin_ids
-
plugin_map
protected java.util.Map plugin_map
-
listeners
protected java.util.List listeners
-
rd_factory
protected ResourceDownloaderFactory rd_factory
-
this_mon
protected AEMonitor this_mon
-
-
Method Detail
-
getSingleton
public static SFPluginDetailsLoader getSingleton()
-
getRelativeURLBase
protected java.lang.String getRelativeURLBase()
-
loadPluginList
protected void loadPluginList() throws SFPluginDetailsException
- Throws:
SFPluginDetailsException
-
addEPIDS
private java.lang.String addEPIDS(java.lang.String str)
-
loadPluginDetails
protected void loadPluginDetails(SFPluginDetailsImpl details) throws SFPluginDetailsException
- Throws:
SFPluginDetailsException
-
processPluginStream
protected boolean processPluginStream(SFPluginDetailsImpl details, java.io.InputStream is)
-
getPluginIDs
public java.lang.String[] getPluginIDs() throws SFPluginDetailsException
- Specified by:
getPluginIDs
in interfaceSFPluginDetailsLoader
- Throws:
SFPluginDetailsException
-
getPluginDetails
public SFPluginDetails getPluginDetails(java.lang.String name) throws SFPluginDetailsException
- Specified by:
getPluginDetails
in interfaceSFPluginDetailsLoader
- Throws:
SFPluginDetailsException
-
getPluginDetails
public SFPluginDetails[] getPluginDetails() throws SFPluginDetailsException
- Specified by:
getPluginDetails
in interfaceSFPluginDetailsLoader
- Throws:
SFPluginDetailsException
-
reportPercentComplete
public void reportPercentComplete(ResourceDownloader downloader, int percentage)
- Specified by:
reportPercentComplete
in interfaceResourceDownloaderListener
-
reportAmountComplete
public void reportAmountComplete(ResourceDownloader downloader, long amount)
- Specified by:
reportAmountComplete
in interfaceResourceDownloaderListener
-
reportActivity
public void reportActivity(ResourceDownloader downloader, java.lang.String activity)
- Specified by:
reportActivity
in interfaceResourceDownloaderListener
-
completed
public boolean completed(ResourceDownloader downloader, java.io.InputStream data)
- Specified by:
completed
in interfaceResourceDownloaderListener
- Returns:
- return true if the completed download is OK. If false is returned then if there are alternative download sources they will be tried. If there are no other sources then the download will be "failed"
-
failed
public void failed(ResourceDownloader downloader, ResourceDownloaderException e)
- Specified by:
failed
in interfaceResourceDownloaderListener
-
informListeners
protected void informListeners(java.lang.String log)
-
reset
public void reset()
- Specified by:
reset
in interfaceSFPluginDetailsLoader
-
addListener
public void addListener(SFPluginDetailsLoaderListener l)
- Specified by:
addListener
in interfaceSFPluginDetailsLoader
-
removeListener
public void removeListener(SFPluginDetailsLoaderListener l)
- Specified by:
removeListener
in interfaceSFPluginDetailsLoader
-
getBaseUrlParams
public static java.lang.String getBaseUrlParams()
-
-