- java.lang.Object
-
- org.tentackle.update.UpdateInfo
-
- All Implemented Interfaces:
java.io.Serializable
public class UpdateInfo extends java.lang.Object implements java.io.SerializableUpdate 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 aCryptoris configured.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetChecksum()Gets the checksum hash to verify the download.longgetSize()Gets the size of the ZIP file.java.lang.StringgetUpdateExecutor()Gets the name of the file to perform the update.java.net.URLgetUrl()Gets the URL to download the update.java.lang.StringgetVersion()Gets the new application version.
Just an info that can be shown to the user.java.lang.StringtoString()
-
-
-
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 aCryptoris configured.- Parameters:
version- the new application versionurl- the URL of the ZIP file the client must downloadchecksum- the checksum hash to verify the downloaded filesize- the size of the ZIP fileupdateExecutor- 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:
toStringin classjava.lang.Object
-
-