Class LoginFailedWithUpdateHandler

java.lang.Object
org.tentackle.fx.rdc.app.LoginFailedHandler
org.tentackle.fx.rdc.update.LoginFailedWithUpdateHandler

public class LoginFailedWithUpdateHandler extends LoginFailedHandler
To handle login failed exceptions.
Author:
harald
  • Constructor Details

    • LoginFailedWithUpdateHandler

      public LoginFailedWithUpdateHandler(DesktopApplication<?> application, javafx.scene.Parent view, org.tentackle.session.SessionInfo sessionInfo)
      Creates a login failed handler.
      Parameters:
      application - the application
      view - the view
      sessionInfo - the session info
  • Method Details

    • handle

      public Runnable handle(Exception ex)
      Overrides:
      handle in class LoginFailedHandler
    • 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 invokes update(UpdateInfo, InstallationType) or terminate(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 application
      updateInfo - the update info of the new application
      installationType - the installation type
      Returns:
      the runnable, never null
    • createUpdateService

      protected UpdateService createUpdateService()
      Creates the remote update service.
      Returns:
      the service object, null if no service configured
    • createUpdateDirectory

      protected File createUpdateDirectory(InstallationType installationType)
      Creates the update directory.
      Parameters:
      installationType - the installation type
      Returns:
      the directory to download and unzip the files for update
    • update

      protected void update(UpdateInfo updateInfo, InstallationType installationType)
      Runs the update.
      Parameters:
      updateInfo - the update info
      installationType - the installation type
    • passSessionInfoViaEnvironment

      protected void passSessionInfoViaEnvironment(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.
      Parameters:
      environment - the process environment
      See Also:
    • terminate

      protected void terminate(String msg, Throwable t)
      Terminates the application.
      Parameters:
      msg - the message shown to the user
      t - the throwable