Class UpdateInfo

  • All Implemented Interfaces:
    java.io.Serializable

    public class UpdateInfo
    extends java.lang.Object
    implements java.io.Serializable
    Update info sent back to the client.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      UpdateInfo​(java.lang.String version, java.net.URL url, java.lang.String checksum, long size, java.lang.String updateExecutor)
      Creates the update info.
      The internal state is encrypted if a Cryptor is configured.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getChecksum()
      Gets the checksum hash to verify the download.
      long getSize()
      Gets the size of the ZIP file.
      java.lang.String getUpdateExecutor()
      Gets the name of the file to perform the update.
      java.net.URL getUrl()
      Gets the URL to download the update.
      java.lang.String getVersion()
      Gets the new application version.
      Just an info that can be shown to the user.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • UpdateInfo

        public UpdateInfo​(java.lang.String version,
                          java.net.URL url,
                          java.lang.String checksum,
                          long size,
                          java.lang.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 Detail

      • getVersion

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

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

        public java.lang.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 java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object