Package esmska.update

Class UpdateChecker


  • public class UpdateChecker
    extends java.lang.Object
    Checks for newer program or gateway version on program's website First of all you must run the checkForUpdates() method, only after it has finished the other methods will give you correct answer about updates availability.
    • Field Detail

      • ACTION_PROGRAM_UPDATE_AVAILABLE

        public static final int ACTION_PROGRAM_UPDATE_AVAILABLE
        new program version is available
        See Also:
        Constant Field Values
      • ACTION_GATEWAY_UPDATE_AVAILABLE

        public static final int ACTION_GATEWAY_UPDATE_AVAILABLE
        new or updated gateway script is available
        See Also:
        Constant Field Values
      • ACTION_PROGRAM_AND_GATEWAY_UPDATE_AVAILABLE

        public static final int ACTION_PROGRAM_AND_GATEWAY_UPDATE_AVAILABLE
        new program version and gateway script is available
        See Also:
        Constant Field Values
      • ACTION_NO_UPDATE_AVAILABLE

        public static final int ACTION_NO_UPDATE_AVAILABLE
        no updates found
        See Also:
        Constant Field Values
      • ACTION_CHECK_FAILED

        public static final int ACTION_CHECK_FAILED
        could not check updates - network error?
        See Also:
        Constant Field Values
      • AUTO_CHECK_INTERVAL

        public static final int AUTO_CHECK_INTERVAL
        The interval in seconds how often to check for updates automatically
        See Also:
        Constant Field Values
    • Method Detail

      • addActionListener

        public void addActionListener​(java.awt.event.ActionListener actionListener)
      • removeActionListener

        public void removeActionListener​(java.awt.event.ActionListener actionListener)
      • getInstance

        public static UpdateChecker getInstance()
        Get program instance
      • checkForUpdates

        public void checkForUpdates()
        Checks for updates asynchronously and notify all added listeners after being finished. Does nothing if already running.
      • isRunning

        public boolean isRunning()
        Whether checking for updates is (still) running
      • isProgramUpdateAvailable

        public boolean isProgramUpdateAvailable()
        Whether a new program update is available. According to user preference it checks against latest stable or unstable program version.
      • getLatestProgramVersion

        public java.lang.String getLatestProgramVersion()
        Get latest program version available online
      • isGatewayUpdateAvailable

        public boolean isGatewayUpdateAvailable​(boolean includeHidden)
        Whether an gateway update is available
      • getGatewayUpdates

        public java.util.Set<GatewayUpdateInfo> getGatewayUpdates​(boolean includeHidden)
        Get info about gateway updates
        Returns:
        unmodifiable set of gateway updates info