Package ome.system

Class UpgradeCheck

  • All Implemented Interfaces:
    java.lang.Runnable

    public class UpgradeCheck
    extends java.lang.Object
    implements java.lang.Runnable
    Contacts a given URL which should be an OME server which will return either an empty String or a URL which points to a needed upgrade.
    Since:
    3.0-Beta2.3
    • Field Detail

      • DEFAULT_TIMEOUT

        public static final int DEFAULT_TIMEOUT
        Default timeout is 10 seconds.
        See Also:
        Constant Field Values
    • Constructor Detail

      • UpgradeCheck

        public UpgradeCheck​(java.lang.String url,
                            java.lang.String version,
                            java.lang.String agent,
                            int timeout)
        Main constructor.
        Parameters:
        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 a
    • Method Detail

      • isUpgradeNeeded

        public boolean isUpgradeNeeded()
      • getUpgradeUrl

        public java.lang.String getUpgradeUrl()
      • isExceptionThrown

        public boolean isExceptionThrown()
      • getExceptionThrown

        public java.lang.Exception getExceptionThrown()
      • run

        public void run()
        If the 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.
        Specified by:
        run in interface java.lang.Runnable