Package com.biglybt.pifimpl.local.update
Class UpdateImpl
java.lang.Object
com.biglybt.pifimpl.local.update.UpdateImpl
- All Implemented Interfaces:
Update
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private UpdatableComponentImpl
private String[]
private String
private ResourceDownloader[]
private UpdateCheckInstanceImpl
private CopyOnWriteList
private boolean
private String
private String
private String
private String
private int
private boolean
private Object
Fields inherited from interface com.biglybt.pif.update.Update
RESTART_REQUIRED_MAYBE, RESTART_REQUIRED_NO, RESTART_REQUIRED_YES
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
UpdateImpl
(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 TypeMethodDescriptionvoid
void
cancel()
cancel this updatevoid
complete
(boolean success) mark the update as complete and inform any listenersprotected UpdatableComponentImpl
getDecision
(int decision_type, String decision_name, String decision_description, Object decision_data) String[]
getName()
int
boolean
boolean
boolean
void
void
setDescriptionURL
(String url) void
setRelativeURLBase
(String base) void
setRestartRequired
(int _restart_required) void
setUserObject
(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:
getCheckInstance
in interfaceUpdate
-
getComponent
-
getName
-
getDescription
- Specified by:
getDescription
in interfaceUpdate
-
getRelativeURLBase
- Specified by:
getRelativeURLBase
in interfaceUpdate
-
setRelativeURLBase
- Specified by:
setRelativeURLBase
in interfaceUpdate
-
getDesciptionURL
- Specified by:
getDesciptionURL
in interfaceUpdate
- Returns:
- null if no description url
-
setDescriptionURL
- Specified by:
setDescriptionURL
in interfaceUpdate
- Parameters:
url
- URL to load instead of showing the description text)
-
getOldVersion
- Specified by:
getOldVersion
in interfaceUpdate
-
getNewVersion
- Specified by:
getNewVersion
in interfaceUpdate
-
getDownloaders
- Specified by:
getDownloaders
in interfaceUpdate
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatory
in interfaceUpdate
-
setRestartRequired
public void setRestartRequired(int _restart_required) - Specified by:
setRestartRequired
in interfaceUpdate
-
getRestartRequired
public int getRestartRequired()- Specified by:
getRestartRequired
in interfaceUpdate
-
setUserObject
- Specified by:
setUserObject
in interfaceUpdate
-
getUserObject
- Specified by:
getUserObject
in interfaceUpdate
-
cancel
public void cancel()Description copied from interface:Update
cancel this update -
complete
public void complete(boolean success) Description copied from interface:Update
mark the update as complete and inform any listeners -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceUpdate
-
isComplete
public boolean isComplete()- Specified by:
isComplete
in interfaceUpdate
-
wasSuccessful
public boolean wasSuccessful()- Specified by:
wasSuccessful
in interfaceUpdate
-
getDecision
public Object getDecision(int decision_type, String decision_name, String decision_description, Object decision_data) - Specified by:
getDecision
in interfaceUpdate
-
verifyData
- Specified by:
verifyData
in interfaceUpdate
- Throws:
UpdateException
-
addListener
- Specified by:
addListener
in interfaceUpdate
-
removeListener
- Specified by:
removeListener
in interfaceUpdate
-