|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UpdateManager
The central resource coordinating updates. This must be registered with the context. The UpdateManager starts and stops all updates, and controls notification to the user.
Method Summary | |
---|---|
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 Updater 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,
UpdateMethod method,
List<URI> updateSources,
String newVersion,
String minVersion)
Called by the Updater, either after check() was called, or it found out on its own. |
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)
|
Method Detail |
---|
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 newVersion
void 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 UpdateType
void renderStatusHTML(Writer out) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |