Index

A C D E G H I J O P R S T U V 
All Classes and Interfaces|All Packages

A

AbstractUpdateServiceImpl - Class in org.tentackle.update
Server side update service implementation.
AbstractUpdateServiceImpl(String) - Constructor for class org.tentackle.update.AbstractUpdateServiceImpl
Creates an update service object.
application() - Method in record class org.tentackle.update.ClientInfo
Returns the value of the application record component.
architecture() - Method in record class org.tentackle.update.ClientInfo
Returns the value of the architecture record component.

C

CallbackReadableByteChannel - Class in org.tentackle.update
A ReadableByteChannel with an optional callback lambda to show the progress.
CallbackReadableByteChannel(ReadableByteChannel, long, Consumer) - Constructor for class org.tentackle.update.CallbackReadableByteChannel
Creates a callback read channel.
checksum() - Method in record class org.tentackle.update.UpdateInfo
Returns the value of the checksum record component.
ClientInfo - Record Class in org.tentackle.update
Client application info sent to the update server.
ClientInfo(String, String, String, String, InstallationType) - Constructor for record class org.tentackle.update.ClientInfo
Creates an instance of a ClientInfo record class.
ClientInfo(String, String, InstallationType) - Constructor for record class org.tentackle.update.ClientInfo
Creates a client application-info.
Platform and architecture are determined from the running JVM via StringHelper.getPlatform() and StringHelper.getArchitecture().
ClientUpdateUtilities - Class in org.tentackle.update
Client side utility methods to implement the application update.
Detects whether the application runs from an updatable jlink or jpackage image, looks up the remote UpdateService, and downloads and verifies the update.
ClientUpdateUtilities() - Constructor for class org.tentackle.update.ClientUpdateUtilities
Creates a client update utilities instance.
close() - Method in class org.tentackle.update.CallbackReadableByteChannel
 
createBaseUrlName(ClientInfo) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Creates the base URL name without extension.
The default implementation returns <updateURL>/<artifactName>-<version>-<platform>-<architecture> with -pkg appended for jpackage installations.
createChecksumURL(ClientInfo) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Creates the URL for the checksum hash file.
createHttpClient() - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Creates the HTTP client to access the update host.
Redirects are followed, except from HTTPS to HTTP.
createHttpRequest(URL, String) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Creates an HTTP request to the update host.
createPreAuthenticationPolicy(Transport) - Method in class org.tentackle.update.ServerUpdateUtilities
Creates the pre-authentication policy for a transport of the update service's own.
Invoked only if the transport is not accepting yet and has no policy, i.e. it is not shared with another server, such as a TripServer, that already decided about its policy.
createUpdateExecutor(ClientInfo) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Creates the name of the update executor.
The script is located in the bin directory of the unzipped update.
createUpdateInfo(String, URL, String, long, String) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Creates the update info to be returned to the client.
createUpdateServiceImpl(Class, String) - Method in class org.tentackle.update.ServerUpdateUtilities
Creates the update service implementation.
The class must provide a public constructor with a single String argument, which receives the download base URL (see AbstractUpdateServiceImpl).
createZipFileName(UpdateInfo) - Method in class org.tentackle.update.ClientUpdateUtilities
Creates the name of the downloaded ZIP file in the update directory.
The default is the last segment of the download URL's path, if it is a plain file name, else update.zip.
createZipURL(ClientInfo) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Creates the URL for the ZIP file.

D

determineChecksumHash(URL) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Determines the checksum hash.
The hash is the first whitespace-delimited token of the checksum file, so the output of sha256sum can be used as is.
determineDownloadSize(URL) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Determines the download size of the ZIP file.
Sends an HTTP HEAD request and takes the content-length of the response.
determineInstallationType() - Method in class org.tentackle.update.ClientUpdateUtilities
Determines the installation type of the running application.
Jlink is checked first, then jpackage.
determineJPackageRoot() - Method in class org.tentackle.update.ClientUpdateUtilities
Determines the jpackage's root installation directory.
Derived from the path of the running executable: Windows: the executable's directory, which must contain app macOS: two levels above Contents/MacOS, which must contain Contents Linux: the parent of bin, which must contain lib/app
downloadZip(UpdateInfo, File, Consumer) - Method in class org.tentackle.update.ClientUpdateUtilities
Downloads the ZIP file and verifies its checksum.
The update info is validated first (see ClientUpdateUtilities.validateUpdateInfo(UpdateInfo)).

E

equals(Object) - Method in record class org.tentackle.update.ClientInfo
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class org.tentackle.update.UpdateInfo
Indicates whether some other object is "equal to" this one.

G

getArtifactName() - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Gets the artifact name excluding the version.
getInstance() - Static method in class org.tentackle.update.ClientUpdateUtilities
The singleton.
getInstance() - Static method in class org.tentackle.update.ServerUpdateUtilities
The singleton.
getMaxDownloadSize() - Method in class org.tentackle.update.ClientUpdateUtilities
Gets the maximum size of a download whose size the server did not announce.
If the size is announced (see UpdateInfo.size()), the download must not exceed it.
getMessageDigest() - Method in class org.tentackle.update.ClientUpdateUtilities
Gets the message digest to create the checksum of the downloaded ZIP file.
getSafeUrlString() - Method in record class org.tentackle.update.UpdateInfo
Gets the download URL in a form that is safe to log or show.
The user info, query and fragment are removed, since a signed or short-lived download URL carries its access token there.
getSize() - Method in class org.tentackle.update.CallbackReadableByteChannel
Gets the number of bytes read so far.
getTimeout() - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Gets the timeout for connecting to the update host and for its responses.
A hanging update host must not block the threads of the update service for good.
getTimeout() - Method in class org.tentackle.update.ClientUpdateUtilities
Gets the timeout for connecting to the download host and for each read from it.
getUpdateInfo(ClientInfo) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Gets the info on how to download and install the update.
The client is expected to update only if the returned version differs from its own.
getUpdateInfo(ClientInfo) - Method in interface org.tentackle.update.UpdateService
Gets the info on how to download and install the update.
The client is expected to update only if the returned version differs from its own.
getUpdateService(String) - Method in class org.tentackle.update.ClientUpdateUtilities
Gets the remote update service object.
If a Cryptor is configured, the service name may be given as an encrypted URL disguised as an http:, https: or rmi: URL (see Cryptor.deriveURL(String, String...)).
getUpdateURL() - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Gets the update base URL.
getUrl() - Method in record class org.tentackle.update.UpdateInfo
Gets the URL to download the update.
getVersion() - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Gets the application version offered to the clients.
Usually the version of the server itself.

H

hashCode() - Method in record class org.tentackle.update.ClientInfo
Returns a hash code value for this object.
hashCode() - Method in record class org.tentackle.update.UpdateInfo
Returns a hash code value for this object.

I

installationType() - Method in record class org.tentackle.update.ClientInfo
Returns the value of the installationType record component.
InstallationType - Enum Class in org.tentackle.update
The installation type of the client application.
isCloseAllTransportsRequested() - Method in record class org.tentackle.update.UpdateInfo
 
isJavaHome(File) - Method in class org.tentackle.update.ClientUpdateUtilities
Checks whether the given directory is the java.home of the running JVM.
Used to verify that a detected jlink image or jpackage runtime is the one this application runs from.
isOpen() - Method in class org.tentackle.update.CallbackReadableByteChannel
 
isPlainFileName(String) - Method in class org.tentackle.update.ClientUpdateUtilities
Returns whether a name sent by the server is a plain file name.
Only letters, digits, dots, dashes and underscores are allowed, and it must not start with a dot or dash.
isSuccessful(int) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Returns whether an HTTP status code denotes success.
isTransportAllowed(URI) - Method in class org.tentackle.update.ClientUpdateUtilities
Checks whether the transport of the update service is allowed.
The plain TCP transports trip and tripc are refused, since anybody on the network path could answer in place of the server and make the client download and run arbitrary code.
isUpdatableJlinkDirectory(File) - Method in class org.tentackle.update.ClientUpdateUtilities
Checks whether the given directory holds an updatable jlink image.
The directory itself and its subdirectories bin, conf, include, legal and lib must exist and be writable.
isUpdatableJPackageApplication() - Method in class org.tentackle.update.ClientUpdateUtilities
Checks whether the application is running in an updatable jpackage installation.
The runtime embedded in the package must be an updatable jlink image.
isUpdateableJlinkApplication() - Method in class org.tentackle.update.ClientUpdateUtilities
Checks whether the application is running in an updatable jlink directory.
Jlink applications are started from the image's root directory, so the current working directory is checked.
isValidChecksum(String) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Returns whether a checksum hash is valid.
The default implementation accepts SHA-256 hashes in hex, upper- or lowercase.

J

JLINK - Enum constant in enum class org.tentackle.update.InstallationType
Per user installation via jlink image.
JPACKAGE - Enum constant in enum class org.tentackle.update.InstallationType
Per user installation via jpackage image.

O

org.tentackle.update - module org.tentackle.update
The application self-update service.
Provides the TRIP UpdateService contract with its request and reply records, the server side to publish the service, and the client side to detect an updatable jlink or jpackage image and to download and verify the update.
org.tentackle.update - package org.tentackle.update
The application self-update service.
The UpdateService contract with its request and reply records, the server side (ServerUpdateUtilities, AbstractUpdateServiceImpl) and the client side (ClientUpdateUtilities).

P

platform() - Method in record class org.tentackle.update.ClientInfo
Returns the value of the platform record component.

R

read(ByteBuffer) - Method in class org.tentackle.update.CallbackReadableByteChannel
 

S

ServerUpdateUtilities - Class in org.tentackle.update
Server side utility methods to implement the application update.
Registers the UpdateService on a TRIP transport.
ServerUpdateUtilities() - Constructor for class org.tentackle.update.ServerUpdateUtilities
Creates a server update utilities instance.
setUpdateURL(String) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Sets the update base URL.
A trailing slash is appended, if missing.
size() - Method in record class org.tentackle.update.UpdateInfo
Returns the value of the size record component.
startUpdateService(String, String, Class) - Method in class org.tentackle.update.ServerUpdateUtilities
Starts the update service.
Requests the transport for the service URL, starts accepting connections if not already done, creates the service implementation and registers it under the URL's path.

T

toString() - Method in record class org.tentackle.update.ClientInfo
Returns a string representation of this record class.
toString() - Method in record class org.tentackle.update.UpdateInfo

U

updateExecutor() - Method in record class org.tentackle.update.UpdateInfo
Returns the value of the updateExecutor record component.
UpdateInfo - Record Class in org.tentackle.update
Update info sent back to the client.
UpdateInfo(String, String, String, long, String) - Constructor for record class org.tentackle.update.UpdateInfo
Creates an instance of a UpdateInfo record class.
UpdateInfo(String, URL, String, long, String) - Constructor for record class org.tentackle.update.UpdateInfo
Creates the update info.
UpdateService - Interface in org.tentackle.update
TRIP service to provide the update info for an application.
urlStr() - Method in record class org.tentackle.update.UpdateInfo
Returns the value of the urlStr record component.

V

validateClientInfo(ClientInfo) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
Validates the client info.
The client info is sent by a client that has not logged in, and the platform and architecture become part of the URLs the server fetches.
validateUpdateInfo(UpdateInfo) - Method in class org.tentackle.update.ClientUpdateUtilities
Validates the update info received from the server before anything is downloaded.
The download URL must be http or https, a checksum must be provided, and the update executor, if any, must be a plain file name, since it is resolved against the bin directory of the unzipped update and executed.
valueOf(String) - Static method in enum class org.tentackle.update.InstallationType
Returns the enum constant of this class with the specified name.
values() - Static method in enum class org.tentackle.update.InstallationType
Returns an array containing the constants of this enum class, in the order they are declared.
version() - Method in record class org.tentackle.update.ClientInfo
Returns the value of the version record component.
version() - Method in record class org.tentackle.update.UpdateInfo
Returns the value of the version record component.
A C D E G H I J O P R S T U V 
All Classes and Interfaces|All Packages