public class UpgradeCheck
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIMEOUT
Default timeout is 10 seconds.
|
Constructor and Description |
---|
UpgradeCheck(java.lang.String url,
java.lang.String version,
java.lang.String agent)
|
UpgradeCheck(java.lang.String url,
java.lang.String version,
java.lang.String agent,
int timeout)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Exception |
getExceptionThrown() |
java.lang.String |
getUpgradeUrl() |
boolean |
isExceptionThrown() |
boolean |
isUpgradeNeeded() |
void |
run()
If the
url has been set to null or the empty string, then no
upgrade check will be performed (silently). |
public static final int DEFAULT_TIMEOUT
public UpgradeCheck(java.lang.String url, java.lang.String version, java.lang.String agent)
public UpgradeCheck(java.lang.String url, java.lang.String version, java.lang.String agent, int timeout)
url
- Null or empty value disables check.version
- Current version as specified in the omero.properties file
under the "omero.version" property. This can be accessed via
IConfig.getVersion() // 4.0.0
or
IConfig.getConfigValue("omero.version") // [optional-]4.0.0[-optional]
agent
- Name of the agent which is accessing the registry. This will
be appended to "OMERO." in order to adhere to the registry
API.timeout
- How long to wait for apublic boolean isUpgradeNeeded()
public java.lang.String getUpgradeUrl()
public boolean isExceptionThrown()
public java.lang.Exception getExceptionThrown()
public void run()
url
has been set to null or the empty string, then no
upgrade check will be performed (silently). If however the string is an
invalid URL, a warning will be printed.
This method should never throw an exception.run
in interface java.lang.Runnable
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.