public interface UpdateManager
Modifier and Type | Field and Description |
---|---|
static String |
APP_NAME
The name we register with the ClientAppManager
|
Modifier and Type | Method and Description |
---|---|
void |
notifyAttemptFailed(UpdateTask task,
String reason,
Throwable t)
Not necessarily the end if there are more URIs to try.
|
void |
notifyCheckComplete(UpdateTask task,
boolean newer,
boolean success)
Called by the Checker after check() was called and all notifyVersionAvailable() callbacks are finished
|
boolean |
notifyComplete(UpdateTask task,
String actualVersion,
File file)
An update has been downloaded but not verified.
|
void |
notifyProgress(UpdateTask task,
String status) |
void |
notifyProgress(UpdateTask task,
String status,
long downloaded,
long totalSize) |
void |
notifyTaskFailed(UpdateTask task,
String reason,
Throwable t)
The task has finished and failed.
|
boolean |
notifyVersionAvailable(UpdateTask task,
URI newsSource,
UpdateType type,
String id,
Map<UpdateMethod,List<URI>> sourceMap,
String newVersion,
String minVersion)
Called by the Checker, either after check() was called, or it found out on its own.
|
boolean |
notifyVersionAvailable(UpdateTask task,
URI newsSource,
UpdateType type,
String id,
UpdateMethod method,
List<URI> updateSources,
String newVersion,
String minVersion)
Called by the Checker, either after check() was called, or it found out on its own.
|
void |
notifyVersionConstraint(UpdateTask task,
URI newsSource,
UpdateType type,
String id,
String newVersion,
String message)
A new version is available but cannot be downloaded or installed due to some constraint.
|
void |
register(Checker checker,
UpdateType type,
UpdateMethod method,
int priority) |
void |
register(Updater updater,
UpdateType type,
UpdateMethod method,
int priority)
Call once for each type/method pair.
|
void |
renderStatusHTML(Writer out)
For debugging
|
void |
shutdown() |
void |
start() |
void |
unregister(Checker checker,
UpdateType type,
UpdateMethod method) |
void |
unregister(Updater updater,
UpdateType type,
UpdateMethod method) |
static final String APP_NAME
void register(Updater updater, UpdateType type, UpdateMethod method, int priority)
void register(Checker checker, UpdateType type, UpdateMethod method, int priority)
void unregister(Updater updater, UpdateType type, UpdateMethod method)
void unregister(Checker checker, UpdateType type, UpdateMethod method)
void start()
void shutdown()
boolean notifyVersionAvailable(UpdateTask task, URI newsSource, UpdateType type, String id, UpdateMethod method, List<URI> updateSources, String newVersion, String minVersion)
newsSource
- who told usid
- plugin name for plugins, ignored otherwisemethod
- How to get the new versionupdateSources
- Where to get the new versionnewVersion
- The new version availableminVersion
- The minimum installed version to be able to update to newVersionboolean notifyVersionAvailable(UpdateTask task, URI newsSource, UpdateType type, String id, Map<UpdateMethod,List<URI>> sourceMap, String newVersion, String minVersion)
newsSource
- who told usid
- plugin name for plugins, ignored otherwisesourceMap
- Mapping of methods to sourcesnewVersion
- The new version availableminVersion
- The minimum installed version to be able to update to newVersionvoid notifyVersionConstraint(UpdateTask task, URI newsSource, UpdateType type, String id, String newVersion, String message)
newsSource
- who told usid
- plugin name for plugins, ignored otherwisenewVersion
- The new version availablemessage
- A translated message to be displayed to the user, non-nullvoid notifyCheckComplete(UpdateTask task, boolean newer, boolean success)
newer
- notifyVersionAvailable was calledsuccess
- check succeeded (newer or not)void notifyProgress(UpdateTask task, String status)
void notifyProgress(UpdateTask task, String status, long downloaded, long totalSize)
void notifyAttemptFailed(UpdateTask task, String reason, Throwable t)
t
- may be nullvoid notifyTaskFailed(UpdateTask task, String reason, Throwable t)
t
- may be nullboolean notifyComplete(UpdateTask task, String actualVersion, File file)
actualVersion
- may be higher (or lower?) than the version requestedfile
- a valid format for the task's UpdateTypevoid renderStatusHTML(Writer out) throws IOException
IOException