forked from I2P_Developers/i2p.i2p
Added a new flavour of checkAvailable() to UpdateManager interface.
This commit is contained in:
@ -275,7 +275,29 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp {
|
|||||||
public String getStatus() {
|
public String getStatus() {
|
||||||
return _status;
|
return _status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is an update available?
|
||||||
|
* Blocking.
|
||||||
|
* An available update may still have a constraint or lack sources.
|
||||||
|
* @param type the UpdateType of this request
|
||||||
|
* @param id id 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) {
|
||||||
|
return checkAvailable(type, "", DEFAULT_CHECK_TIME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
public String checkAvailable(UpdateType type, long maxWait) {
|
public String checkAvailable(UpdateType type, long maxWait) {
|
||||||
return checkAvailable(type, "", maxWait);
|
return checkAvailable(type, "", maxWait);
|
||||||
}
|
}
|
||||||
@ -284,6 +306,8 @@ public class ConsoleUpdateManager implements UpdateManager, RouterApp {
|
|||||||
* Is an update available?
|
* Is an update available?
|
||||||
* Blocking.
|
* Blocking.
|
||||||
* An available update may still have a constraint or lack sources.
|
* An available update may still have a constraint or lack sources.
|
||||||
|
* @param type the UpdateType of this request
|
||||||
|
* @param id id of this request
|
||||||
* @param maxWait max time to block
|
* @param maxWait max time to block
|
||||||
* @return new version or null if nothing newer is available
|
* @return new version or null if nothing newer is available
|
||||||
*/
|
*/
|
||||||
|
@ -122,6 +122,16 @@ public interface UpdateManager {
|
|||||||
*/
|
*/
|
||||||
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
|
||||||
|
* @return new version or null if nothing newer is available
|
||||||
|
* @since 0.9.21
|
||||||
|
*/
|
||||||
|
public String checkAvailable(UpdateType type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is an update available?
|
* Is an update available?
|
||||||
* Blocking.
|
* Blocking.
|
||||||
|
Reference in New Issue
Block a user