Class UpdateCheckerImpl
java.lang.Object
com.biglybt.pifimpl.local.update.UpdateCheckerImpl
- All Implemented Interfaces:
UpdateChecker
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate UpdateCheckInstanceImplprivate booleanprivate UpdatableComponentImplprivate booleanprivate Throwableprivate Listprivate Listprivate booleanprivate AESemaphoreprivate AEMonitor -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUpdateCheckerImpl(UpdateCheckInstanceImpl _check_instance, UpdatableComponentImpl _component, AESemaphore _sem) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddUpdate(String name, String[] description, String old_version, String new_version, ResourceDownloader[] downloaders, int restart_required) Add an update with a number of downloadersaddUpdate(String name, String[] description, String old_version, String new_version, ResourceDownloader downloader, int restart_required) Add an update with a single downloaderprotected voidcancel()voidIndicate that update checking is complete and that any updates required have been added by the addUpdate methodsFor updates that require a stop, update-action and then start you create an installer.booleanvoidvoidvoidreportProgress(String str) report a progress string to registered listenersvoidIndicates that the update check failed.
-
Field Details
-
check_instance
-
component
-
semaphore
-
completed
private boolean completed -
failed
private boolean failed -
failure
-
cancelled
private boolean cancelled -
sem_released
private boolean sem_released -
listeners
-
progress_listeners
-
this_mon
-
-
Constructor Details
-
UpdateCheckerImpl
protected UpdateCheckerImpl(UpdateCheckInstanceImpl _check_instance, UpdatableComponentImpl _component, AESemaphore _sem)
-
-
Method Details
-
getCheckInstance
- Specified by:
getCheckInstancein interfaceUpdateChecker
-
addUpdate
public Update addUpdate(String name, String[] description, String old_version, String new_version, ResourceDownloader downloader, int restart_required) Description copied from interface:UpdateCheckerAdd an update with a single downloader- Specified by:
addUpdatein interfaceUpdateChecker
-
addUpdate
public Update addUpdate(String name, String[] description, String old_version, String new_version, ResourceDownloader[] downloaders, int restart_required) Description copied from interface:UpdateCheckerAdd an update with a number of downloaders- Specified by:
addUpdatein interfaceUpdateChecker
-
createInstaller
Description copied from interface:UpdateCheckerFor updates that require a stop, update-action and then start you create an installer. This allows the specification of actions such as the replacement of a DLL- Specified by:
createInstallerin interfaceUpdateChecker- Returns:
- Throws:
UpdateException
-
getComponent
- Specified by:
getComponentin interfaceUpdateChecker
-
completed
public void completed()Description copied from interface:UpdateCheckerIndicate that update checking is complete and that any updates required have been added by the addUpdate methods- Specified by:
completedin interfaceUpdateChecker
-
setFailed
Description copied from interface:UpdateCheckerIndicates that the update check failed. Of particular importance for mandatory components (e.g. AZ core) as failure of a mandatory one causes all other updates to be aborted- Specified by:
setFailedin interfaceUpdateChecker
-
getFailed
public boolean getFailed()- Specified by:
getFailedin interfaceUpdateChecker
-
getFailureReason
- Specified by:
getFailureReasonin interfaceUpdateChecker
-
cancel
protected void cancel() -
addListener
- Specified by:
addListenerin interfaceUpdateChecker
-
removeListener
- Specified by:
removeListenerin interfaceUpdateChecker
-
reportProgress
Description copied from interface:UpdateCheckerreport a progress string to registered listeners- Specified by:
reportProgressin interfaceUpdateChecker- Parameters:
str-
-
addProgressListener
- Specified by:
addProgressListenerin interfaceUpdateChecker
-
removeProgressListener
- Specified by:
removeProgressListenerin interfaceUpdateChecker
-