Module org.tentackle.fx.rdc.update
Package org.tentackle.fx.rdc.update
Class LoginFailedWithUpdateHandler
java.lang.Object
org.tentackle.fx.rdc.app.LoginFailedHandler
org.tentackle.fx.rdc.update.LoginFailedWithUpdateHandler
To handle login failed exceptions.
- Author:
- harald
-
Constructor Summary
ConstructorsConstructorDescriptionLoginFailedWithUpdateHandler(DesktopApplication<?> application, javafx.scene.Parent view, org.tentackle.session.SessionInfo sessionInfo) Creates a login failed handler. -
Method Summary
Modifier and TypeMethodDescriptionprotected FilecreateUpdateDirectory(InstallationType installationType) Creates the update directory.protected RunnablecreateUpdateRunnable(ClientInfo clientInfo, UpdateInfo updateInfo, InstallationType installationType) Creates a runnable that will be invoked if a newer version exists.
The default implementation asks the user whether to update or not and invokesupdate(UpdateInfo, InstallationType)orterminate(String, Throwable), respectively.
Applications running in unattended mode (presentation mode, dashboards, etc...) may override this method and update without asking the user.protected UpdateServiceCreates the remote update service.protected voidpassSessionInfoViaEnvironment(Map<String, String> environment) Passes the current username and password encrypted to the process environment of the updated application.
This happens only if both the username and password were given and a valid cryptor was found.protected voidTerminates the application.protected voidupdate(UpdateInfo updateInfo, InstallationType installationType) Runs the update.Methods inherited from class org.tentackle.fx.rdc.app.LoginFailedHandler
getApplication, getSessionInfo, getView
-
Constructor Details
-
LoginFailedWithUpdateHandler
public LoginFailedWithUpdateHandler(DesktopApplication<?> application, javafx.scene.Parent view, org.tentackle.session.SessionInfo sessionInfo) Creates a login failed handler.- Parameters:
application- the applicationview- the viewsessionInfo- the session info
-
-
Method Details
-
handle
- Overrides:
handlein classLoginFailedHandler
-
createUpdateRunnable
protected Runnable createUpdateRunnable(ClientInfo clientInfo, UpdateInfo updateInfo, InstallationType installationType) Creates a runnable that will be invoked if a newer version exists.
The default implementation asks the user whether to update or not and invokesupdate(UpdateInfo, InstallationType)orterminate(String, Throwable), respectively.
Applications running in unattended mode (presentation mode, dashboards, etc...) may override this method and update without asking the user.- Parameters:
clientInfo- the client info of the currently running applicationupdateInfo- the update info of the new applicationinstallationType- the installation type- Returns:
- the runnable, never null
-
createUpdateService
Creates the remote update service.- Returns:
- the service object, null if no service configured
-
createUpdateDirectory
Creates the update directory.- Parameters:
installationType- the installation type- Returns:
- the directory to download and unzip the files for update
-
update
Runs the update.- Parameters:
updateInfo- the update infoinstallationType- the installation type
-
passSessionInfoViaEnvironment
Passes the current username and password encrypted to the process environment of the updated application.
This happens only if both the username and password were given and a valid cryptor was found.- Parameters:
environment- the process environment- See Also:
-
terminate
Terminates the application.- Parameters:
msg- the message shown to the usert- the throwable
-