Interface LaunchContext

All Known Implementing Classes:
LaunchContextImpl

public interface LaunchContext
  • Field Details

  • Method Details

    • getParent

      LaunchParent getParent()
    • getScopeCode

      String getScopeCode()
      Returns:
      "C" for client, "D" for designer
    • getCacheDir

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

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

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

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

      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

      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

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

      List<GatewayAddress> getGatewayAddresses()
    • getGatewayAddress

      GatewayAddress getGatewayAddress()
    • getProjectName

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

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

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

      File getProjectCacheFile()
    • getProjectCacheChkFile

      File getProjectCacheChkFile()
    • getTranslationDBLocation

      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 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:
      IOException
    • updateGatewayAddressListCache

      void updateGatewayAddressListCache(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(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(String key, T defaultValue)
    • setAttribute

      void setAttribute(String key, Object value)
    • getAttributes

      Map<String,Object> getAttributes()
      Retrieves the raw attribute map