Package com.biglybt.pifimpl.local.update
Class UpdateCheckerImpl
java.lang.Object
com.biglybt.pifimpl.local.update.UpdateCheckerImpl
- All Implemented Interfaces:
UpdateChecker
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private UpdateCheckInstanceImpl
private boolean
private UpdatableComponentImpl
private boolean
private Throwable
private List
private List
private boolean
private AESemaphore
private AEMonitor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
UpdateCheckerImpl
(UpdateCheckInstanceImpl _check_instance, UpdatableComponentImpl _component, AESemaphore _sem) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addUpdate
(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 void
cancel()
void
Indicate 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.boolean
void
void
void
reportProgress
(String str) report a progress string to registered listenersvoid
Indicates 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:
getCheckInstance
in interfaceUpdateChecker
-
addUpdate
public Update addUpdate(String name, String[] description, String old_version, String new_version, ResourceDownloader downloader, int restart_required) Description copied from interface:UpdateChecker
Add an update with a single downloader- Specified by:
addUpdate
in interfaceUpdateChecker
-
addUpdate
public Update addUpdate(String name, String[] description, String old_version, String new_version, ResourceDownloader[] downloaders, int restart_required) Description copied from interface:UpdateChecker
Add an update with a number of downloaders- Specified by:
addUpdate
in interfaceUpdateChecker
-
createInstaller
Description copied from interface:UpdateChecker
For 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:
createInstaller
in interfaceUpdateChecker
- Returns:
- Throws:
UpdateException
-
getComponent
- Specified by:
getComponent
in interfaceUpdateChecker
-
completed
public void completed()Description copied from interface:UpdateChecker
Indicate that update checking is complete and that any updates required have been added by the addUpdate methods- Specified by:
completed
in interfaceUpdateChecker
-
setFailed
Description copied from interface:UpdateChecker
Indicates 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:
setFailed
in interfaceUpdateChecker
-
getFailed
public boolean getFailed()- Specified by:
getFailed
in interfaceUpdateChecker
-
getFailureReason
- Specified by:
getFailureReason
in interfaceUpdateChecker
-
cancel
protected void cancel() -
addListener
- Specified by:
addListener
in interfaceUpdateChecker
-
removeListener
- Specified by:
removeListener
in interfaceUpdateChecker
-
reportProgress
Description copied from interface:UpdateChecker
report a progress string to registered listeners- Specified by:
reportProgress
in interfaceUpdateChecker
- Parameters:
str
-
-
addProgressListener
- Specified by:
addProgressListener
in interfaceUpdateChecker
-
removeProgressListener
- Specified by:
removeProgressListener
in interfaceUpdateChecker
-