Package com.biglybt.update
Class CoreUpdateChecker
java.lang.Object
com.biglybt.update.CoreUpdateChecker
- All Implemented Interfaces:
Plugin
,UpdatableComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
static final String
protected LoggerChannel
static final String
protected PluginInterface
static final int
static final int
protected ResourceDownloaderListener
static final int
static final int
protected ResourceDownloaderFactory
static final String
protected static CoreUpdateChecker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkForUpdate
(UpdateChecker checker) private void
displayUserMessage
(Map reply) Log and display a user message if contained within reply.static void
protected void
private static String
findCommand
(String name) int
estimated maximum time to check whether an update is required or not in SECONDSgetName()
Name of the updatable componentstatic CoreUpdateChecker
protected void
handleZIPUpdate
(UpdateChecker checker, InputStream data) void
initialize
(PluginInterface _plugin_interface) This method is called when the Plugin is loaded by the clientprotected void
installUpdate
(UpdateChecker checker, Update update, ResourceDownloader rd, String filename, String version, InputStream data) protected void
launchUpdate
(File file, String[] args) static void
private static void
runCommand
(String[] command, boolean wait) protected static boolean
shouldUpdate
(String current_version, String latest_version) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.biglybt.pif.Plugin
getInitialProperties
-
Field Details
-
LATEST_VERSION_PROPERTY
- See Also:
-
MESSAGE_PROPERTY
- See Also:
-
RD_GET_DETAILS_RETRIES
public static final int RD_GET_DETAILS_RETRIES- See Also:
-
RD_GET_MIRRORS_RETRIES
public static final int RD_GET_MIRRORS_RETRIES- See Also:
-
RD_SIZE_RETRIES
public static final int RD_SIZE_RETRIES- See Also:
-
RD_SIZE_TIMEOUT
public static final int RD_SIZE_TIMEOUT- See Also:
-
RES_EXPLICIT_FILE
- See Also:
-
singleton
-
plugin_interface
-
rdf
-
log
-
rd_logger
-
first_check
protected boolean first_check
-
-
Constructor Details
-
CoreUpdateChecker
public CoreUpdateChecker()
-
-
Method Details
-
getSingleton
-
doUsageStats
public static void doUsageStats() -
doUsageStatsSupport
protected void doUsageStatsSupport() -
initialize
Description copied from interface:Plugin
This method is called when the Plugin is loaded by the client- Specified by:
initialize
in interfacePlugin
- Parameters:
_plugin_interface
- the interface that the plugin must use to communicate with the client
-
getName
Description copied from interface:UpdatableComponent
Name of the updatable component- Specified by:
getName
in interfaceUpdatableComponent
- Returns:
-
getMaximumCheckTime
public int getMaximumCheckTime()Description copied from interface:UpdatableComponent
estimated maximum time to check whether an update is required or not in SECONDS- Specified by:
getMaximumCheckTime
in interfaceUpdatableComponent
- Returns:
-
checkForUpdate
- Specified by:
checkForUpdate
in interfaceUpdatableComponent
-
displayUserMessage
Log and display a user message if contained within reply.- Parameters:
reply
- from server
-
installUpdate
protected void installUpdate(UpdateChecker checker, Update update, ResourceDownloader rd, String filename, String version, InputStream data) -
handleZIPUpdate
- Throws:
Exception
-
launchUpdate
-
findCommand
-
runCommand
- Throws:
Throwable
-
shouldUpdate
-
main
-