Class CoreUpdateChecker
java.lang.Object
com.biglybt.update.CoreUpdateChecker
- All Implemented Interfaces:
Plugin, UpdatableComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final Stringprotected LoggerChannelstatic final Stringprotected PluginInterfacestatic final intstatic final intprotected ResourceDownloaderListenerstatic final intstatic final intprotected ResourceDownloaderFactorystatic final Stringprotected static CoreUpdateChecker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckForUpdate(UpdateChecker checker) private voiddisplayUserMessage(Map reply) Log and display a user message if contained within reply.static voidprotected voidprivate static StringfindCommand(String name) intestimated maximum time to check whether an update is required or not in SECONDSgetName()Name of the updatable componentstatic CoreUpdateCheckerprotected voidhandleZIPUpdate(UpdateChecker checker, InputStream data) voidinitialize(PluginInterface _plugin_interface) This method is called when the Plugin is loaded by the clientprotected voidinstallUpdate(UpdateChecker checker, Update update, ResourceDownloader rd, String filename, String version, InputStream data) protected voidlaunchUpdate(File file, String[] args) static voidprivate static voidrunCommand(String[] command, boolean wait) protected static booleanshouldUpdate(String current_version, String latest_version) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:PluginThis method is called when the Plugin is loaded by the client- Specified by:
initializein interfacePlugin- Parameters:
_plugin_interface- the interface that the plugin must use to communicate with the client
-
getName
Description copied from interface:UpdatableComponentName of the updatable component- Specified by:
getNamein interfaceUpdatableComponent- Returns:
-
getMaximumCheckTime
public int getMaximumCheckTime()Description copied from interface:UpdatableComponentestimated maximum time to check whether an update is required or not in SECONDS- Specified by:
getMaximumCheckTimein interfaceUpdatableComponent- Returns:
-
checkForUpdate
- Specified by:
checkForUpdatein 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
-
shouldUpdate
-
main
-