Class UpdateImpl
java.lang.Object
com.biglybt.pifimpl.local.update.UpdateImpl
- All Implemented Interfaces:
Update
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate UpdatableComponentImplprivate String[]private Stringprivate ResourceDownloader[]private UpdateCheckInstanceImplprivate CopyOnWriteListprivate booleanprivate Stringprivate Stringprivate Stringprivate Stringprivate intprivate booleanprivate ObjectFields inherited from interface Update
RESTART_REQUIRED_MAYBE, RESTART_REQUIRED_NO, RESTART_REQUIRED_YES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUpdateImpl(UpdateCheckInstanceImpl _instance, UpdatableComponentImpl _component, String _name, String[] _desc, String _old_version, String _new_version, ResourceDownloader[] _downloaders, boolean _mandatory, int _restart_required) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcancel()cancel this updatevoidcomplete(boolean success) mark the update as complete and inform any listenersprotected UpdatableComponentImplgetDecision(int decision_type, String decision_name, String decision_description, Object decision_data) String[]getName()intbooleanbooleanbooleanvoidvoidsetDescriptionURL(String url) voidsetRelativeURLBase(String base) voidsetRestartRequired(int _restart_required) voidsetUserObject(Object obj) verifyData(InputStream is, boolean force) boolean
-
Field Details
-
instance
-
component
-
name
-
description
-
relative_url_base
-
old_version
-
new_version
-
downloaders
-
mandatory
private boolean mandatory -
restart_required
private int restart_required -
description_url
-
user_object
-
listeners
-
cancelled
private volatile boolean cancelled -
complete
private volatile boolean complete -
succeeded
private volatile boolean succeeded
-
-
Constructor Details
-
UpdateImpl
protected UpdateImpl(UpdateCheckInstanceImpl _instance, UpdatableComponentImpl _component, String _name, String[] _desc, String _old_version, String _new_version, ResourceDownloader[] _downloaders, boolean _mandatory, int _restart_required)
-
-
Method Details
-
getCheckInstance
- Specified by:
getCheckInstancein interfaceUpdate
-
getComponent
-
getName
-
getDescription
- Specified by:
getDescriptionin interfaceUpdate
-
getRelativeURLBase
- Specified by:
getRelativeURLBasein interfaceUpdate
-
setRelativeURLBase
- Specified by:
setRelativeURLBasein interfaceUpdate
-
getDesciptionURL
- Specified by:
getDesciptionURLin interfaceUpdate- Returns:
- null if no description url
-
setDescriptionURL
- Specified by:
setDescriptionURLin interfaceUpdate- Parameters:
url- URL to load instead of showing the description text)
-
getOldVersion
- Specified by:
getOldVersionin interfaceUpdate
-
getNewVersion
- Specified by:
getNewVersionin interfaceUpdate
-
getDownloaders
- Specified by:
getDownloadersin interfaceUpdate
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatoryin interfaceUpdate
-
setRestartRequired
public void setRestartRequired(int _restart_required) - Specified by:
setRestartRequiredin interfaceUpdate
-
getRestartRequired
public int getRestartRequired()- Specified by:
getRestartRequiredin interfaceUpdate
-
setUserObject
- Specified by:
setUserObjectin interfaceUpdate
-
getUserObject
- Specified by:
getUserObjectin interfaceUpdate
-
cancel
-
complete
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceUpdate
-
isComplete
public boolean isComplete()- Specified by:
isCompletein interfaceUpdate
-
wasSuccessful
public boolean wasSuccessful()- Specified by:
wasSuccessfulin interfaceUpdate
-
getDecision
-
verifyData
- Specified by:
verifyDatain interfaceUpdate- Throws:
UpdateException
-
addListener
- Specified by:
addListenerin interfaceUpdate
-
removeListener
- Specified by:
removeListenerin interfaceUpdate
-