Index
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
applicationrecord component. - architecture() - Method in record class org.tentackle.update.ClientInfo
-
Returns the value of the
architecturerecord component.
C
- CallbackReadableByteChannel - Class in org.tentackle.update
-
A
ReadableByteChannelwith 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
checksumrecord 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
ClientInforecord 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 viaStringHelper.getPlatform()andStringHelper.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 remoteUpdateService, 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-pkgappended 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 aTripServer, 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 thebindirectory 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 singleStringargument, which receives the download base URL (seeAbstractUpdateServiceImpl). - 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, elseupdate.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 ofsha256sumcan be used as is. - determineDownloadSize(URL) - Method in class org.tentackle.update.AbstractUpdateServiceImpl
-
Determines the download size of the ZIP file.
Sends an HTTPHEADrequest and takes thecontent-lengthof 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 containappmacOS: two levels aboveContents/MacOS, which must containContentsLinux: the parent ofbin, which must containlib/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 (seeClientUpdateUtilities.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 (seeUpdateInfo.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 aCryptoris configured, the service name may be given as an encrypted URL disguised as anhttp:,https:orrmi:URL (seeCryptor.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
installationTyperecord 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.homeof 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 transportstripandtripcare 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 subdirectoriesbin,conf,include,legalandlibmust 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 TRIPUpdateServicecontract 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.
TheUpdateServicecontract 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
platformrecord 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 theUpdateServiceon 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
sizerecord 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
updateExecutorrecord 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
UpdateInforecord 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
urlStrrecord 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 behttporhttps, a checksum must be provided, and the update executor, if any, must be a plain file name, since it is resolved against thebindirectory 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
versionrecord component. - version() - Method in record class org.tentackle.update.UpdateInfo
-
Returns the value of the
versionrecord component.
All Classes and Interfaces|All Packages