forked from I2P_Developers/i2p.i2p
Added checkAvailable(), update() and getStatus() to UpdateManager interface.
This commit is contained in:
@ -121,6 +121,80 @@ public interface UpdateManager {
|
|||||||
* @return true if valid, false if corrupt
|
* @return true if valid, false if corrupt
|
||||||
*/
|
*/
|
||||||
public boolean notifyComplete(UpdateTask task, String actualVersion, File file);
|
public boolean notifyComplete(UpdateTask task, String actualVersion, File file);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is an update available?
|
||||||
|
* Blocking.
|
||||||
|
* An available update may still have a constraint or lack sources.
|
||||||
|
* @param type the UpdateType of this request
|
||||||
|
* @param maxWait max time to block
|
||||||
|
* @return new version or null if nothing newer is available
|
||||||
|
* @since 0.9.21
|
||||||
|
*/
|
||||||
|
public String checkAvailable(UpdateType type, long maxWait);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is an update available?
|
||||||
|
* Blocking.
|
||||||
|
* An available update may still have a constraint or lack sources.
|
||||||
|
* @param type the UpdateType of this request
|
||||||
|
* @param maxWait max time to block
|
||||||
|
* @param id id of this request
|
||||||
|
* @return new version or null if nothing newer is available
|
||||||
|
* @since 0.9.21
|
||||||
|
*/
|
||||||
|
public String checkAvailable(UpdateType type, String id, long maxWait);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Non-blocking. Does not check.
|
||||||
|
* Fails if check or update already in progress.
|
||||||
|
* If returns true, then call isUpdateInProgress() in a loop
|
||||||
|
* @param type the UpdateType of this request
|
||||||
|
* @param maxTime not honored by all Updaters
|
||||||
|
* @return true if task started
|
||||||
|
* @since 0.9.21
|
||||||
|
*/
|
||||||
|
public boolean update(UpdateType type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Non-blocking. Does not check.
|
||||||
|
* Fails if check or update already in progress.
|
||||||
|
* If returns true, then call isUpdateInProgress() in a loop
|
||||||
|
* @param type the UpdateType of this request
|
||||||
|
* @param id id of this request
|
||||||
|
* @return true if task started
|
||||||
|
* @since 0.9.21
|
||||||
|
*/
|
||||||
|
public boolean update(UpdateType type, String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Non-blocking. Does not check.
|
||||||
|
* Fails if check or update already in progress.
|
||||||
|
* If returns true, then call isUpdateInProgress() in a loop
|
||||||
|
* @param type the UpdateType of this request
|
||||||
|
* @param maxTime not honored by all Updaters
|
||||||
|
* @return true if task started
|
||||||
|
* @since 0.9.21
|
||||||
|
*/
|
||||||
|
public boolean update(UpdateType type, long maxTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Non-blocking. Does not check.
|
||||||
|
* Fails if check or update already in progress.
|
||||||
|
* If returns true, then call isUpdateInProgress() in a loop
|
||||||
|
* @param type the UpdateType of this request
|
||||||
|
* @param maxTime not honored by all Updaters
|
||||||
|
* @param id id of this request
|
||||||
|
* @return true if task started
|
||||||
|
* @since 0.9.21
|
||||||
|
*/
|
||||||
|
public boolean update(UpdateType type, String id, long maxTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The status on any update current or last finished.
|
||||||
|
* @return status or ""
|
||||||
|
*/
|
||||||
|
public String getStatus();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For debugging
|
* For debugging
|
||||||
|
Reference in New Issue
Block a user