Interface LaunchContext

    • Method Detail

      • getScopeCode

        java.lang.String getScopeCode()
      • getCacheDir

        java.io.File getCacheDir()
        The base of the cache dirs: %USER_HOME%/.ignition/cache/
      • getResourceDir

        java.io.File getResourceDir()
        The base of the cached resources: %USER_HOME%/.ignition/cache/resources/
      • log

        void log​(java.lang.String message,
                 java.lang.Object... args)
        A shortcut for:

         getLog().printf(message, args);
         getLog().println();
         
      • getLog

        java.io.PrintWriter getLog()
        A PrintWriter that steps can use to log their progress. Under normal conditions, this log is echoed to System.out. However, if an error ever occurs during the launch procedure, the entire contents of the log will be written to a launch crash file under the user's cache dir.
      • getLaunchManifest

        LaunchManifest getLaunchManifest()
        This LaunchManifest is downloaded from the gateway during ConnectStep. It describes all JAR files that will we'll need to start up the app of this context, including their CRC32 checksums. Will only be set after ConnectStep finishes.
      • getGwCacheDir

        java.io.File getGwCacheDir()
        The actual cache directory for the specific gateway that we ended up connecting to. Only set after CacheStep runs. %USER_HOME%/.ignition/cache/gwHOST_HTTP_HTTPS_CONTEXT/Cx where "x" is the client ID that this JVM has claimed. Each JVM gets its own cache dir so that the they don't step on each other's toes when downloading/modifying jar files.
      • getMainClass

        java.lang.String getMainClass()
        The name of the class that should be started during StartupStep
      • getGatewayAddresses

        java.util.List<GatewayAddress> getGatewayAddresses()
      • getProjectName

        java.lang.String getProjectName()
        The name of the project. May not be used in all scopes
      • getPlatformEdition

        java.lang.String getPlatformEdition()
        The platform edition. Standard edition = "", Edge edition = "edge"
      • getEdgeFlags

        java.util.List<java.lang.String> getEdgeFlags()
        Currently should return an empty list if edition is not edge.
      • getProjectCacheFile

        java.io.File getProjectCacheFile()
      • getProjectCacheChkFile

        java.io.File getProjectCacheChkFile()
      • getTranslationDBLocation

        java.io.File getTranslationDBLocation()
        Returns the location of the cached translation term db file. The file will be in the form of "XXX_e{d}_v{d}.dat". The "e{d}" is the edit version, the "v{d}" is the serialization version.
      • updateProjectCache

        void updateProjectCache​(LaunchContext.WritableProject project)
                         throws java.io.IOException
        This overload of updateProjectCache takes a WriteableProject, which lets the project be streamed. We cannot remove the old byte[] version, because of re-targeting compatibility.
        Throws:
        java.io.IOException
      • updateGatewayAddressListCache

        void updateGatewayAddressListCache​(java.util.List<GatewayAddress> addrs)
        Updates the cache with a list of gateway addresses that will be available for use next time this project is loaded. Should be update when the client receives notification that new cluster gateways have been added
      • getUserObject

        byte[] getUserObject()
        Returns a serialized user object (if any) that was passed as part of a restart
      • getAttribute

        <T> T getAttribute​(java.lang.String key)
        A free-for-all map of objects that clients can use to communicate between launches. Beware that one should only store types is this map that are loaded by the system classloader - not custom objects. Any custom objects should be serialized to a byte[] first.
      • getAttribute

        <T> T getAttribute​(java.lang.String key,
                           T defaultValue)
      • setAttribute

        void setAttribute​(java.lang.String key,
                          java.lang.Object value)
      • getAttributes

        java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Retrieves the raw attribute map