Class UpdateInfo

java.lang.Object
org.tentackle.update.UpdateInfo
All Implemented Interfaces:
Serializable

public class UpdateInfo extends Object implements Serializable
Update info sent back to the client.
See Also:
  • Constructor Details

    • UpdateInfo

      public UpdateInfo(String version, URL url, String checksum, long size, String updateExecutor)
      Creates the update info.
      The internal state is encrypted if a Cryptor is configured.
      Parameters:
      version - the new application version
      url - the URL of the ZIP file the client must download
      checksum - the checksum hash to verify the downloaded file
      size - the size of the ZIP file
      updateExecutor - the filename to execute to perform the update
  • Method Details

    • getVersion

      public String getVersion()
      Gets the new application version.
      Just an info that can be shown to the user.
      Returns:
      the new version
    • getUrl

      public URL getUrl()
      Gets the URL to download the update.
      Returns:
      the URL pointing to the ZIP file, usually via http or https
    • getChecksum

      public String getChecksum()
      Gets the checksum hash to verify the download.
      Returns:
      the checksum hash
    • getSize

      public long getSize()
      Gets the size of the ZIP file.
      Returns:
      the size
    • getUpdateExecutor

      public String getUpdateExecutor()
      Gets the name of the file to perform the update.
      Returns:
      the updater, usually "update.sh" or "update.cmd", depending on the platform
    • toString

      public String toString()
      Overrides:
      toString in class Object