Class ClientLaunchHook
- java.lang.Object
-
- com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook
-
- All Implemented Interfaces:
LaunchHook
public class ClientLaunchHook extends java.lang.Object implements LaunchHook
This is the hook that gets called from the client bootstrap launcher. This is the "entrypoint" for the Vision Client. It's ClientContextImpl will last for its entire lifecycle, which will always be a single project but may involve logging in and out, and project updates.
-
-
Constructor Summary
Constructors Constructor Description ClientLaunchHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setup(LaunchStep startupStep, LaunchContext context)
Called during the final "step" of the bootstrap launch process.void
startup()
Called after setup() to start the application.void
staticSetup()
This setup will be called first, before setup(), but only the first time in a given JVM.
-
-
-
Method Detail
-
staticSetup
public void staticSetup()
Description copied from interface:LaunchHook
This setup will be called first, before setup(), but only the first time in a given JVM.- Specified by:
staticSetup
in interfaceLaunchHook
-
setup
public void setup(LaunchStep startupStep, LaunchContext context) throws java.lang.Exception
Called during the final "step" of the bootstrap launch process.
- Parses the project that the bootstrap loaded downloaded or read in from the cache, and turns it into a bona-fide Project object.
- Creates the ClientContextImpl which will last the entire lifetime of this Client instance. (but not the bootstrap loader/reloader instance.
- Initializes the GatewayConnectionManager with a ClientGatewayConnection instance and the Gateway URLS found in launchContext.getGatewayAddresses()
- Verifies that connection is valid.
- Loads any Client-scope modules (but does not start them up yet.)
- Attempts to authenticate if:
- This launch was from a retarget. OR
- The project if set to auto-login.
- Specified by:
setup
in interfaceLaunchHook
- Parameters:
startupStep
- The step being displayed. Use this step to affect the message, progress, indeterminate indication, etc of the loading splash screen.context
- The launch context contains information gathered during the loading phase that should be relevant to the starting application.- Throws:
java.lang.Exception
-
startup
public void startup() throws java.lang.Exception
Description copied from interface:LaunchHook
Called after setup() to start the application.- Specified by:
startup
in interfaceLaunchHook
- Throws:
java.lang.Exception
-
-