Class LaunchContextImpl
- java.lang.Object
- 
- com.inductiveautomation.ignition.client.launch.LaunchContextImpl
 
- 
- All Implemented Interfaces:
- LaunchContext
 
 public class LaunchContextImpl extends java.lang.Object implements LaunchContext 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.client.launch.LaunchContextLaunchContext.WritableProject
 
- 
 - 
Field Summary- 
Fields inherited from interface com.inductiveautomation.ignition.client.launch.LaunchContextCONDENSED_FONT_ATTRIBUTE, FRAMEWORK_ATTRIBUTE, SSO_PASSWORD, SSO_USERNAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description LaunchContextImpl(java.util.ResourceBundle bundle, LaunchSpec spec, java.io.File cacheDir, LaunchParent parent, java.util.Map<java.lang.String,java.lang.Object> attributes)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetAttribute(java.lang.String key)A free-for-all map of objects that clients can use to communicate between launches.<T> TgetAttribute(java.lang.String key, T defaultValue)java.util.Map<java.lang.String,java.lang.Object>getAttributes()Retrieves the raw attribute mapjava.util.ResourceBundlegetBundle()java.io.FilegetCacheDir()The base of the cache dirs: %USER_HOME%/.ignition/cache/LaunchManifestgetDownloadRequiredManifest()java.util.List<java.lang.String>getEdgeFlags()Currently should return an empty list if edition is not edge.GatewayAddressgetGatewayAddress()java.util.List<GatewayAddress>getGatewayAddresses()java.io.FilegetGwCacheDir()The actual cache directory for the specific gateway that we ended up connecting to.LaunchManifestgetLaunchManifest()This LaunchManifest is downloaded from the gateway during ConnectStep.java.io.PrintWritergetLog()A PrintWriter that steps can use to log their progress.java.lang.StringgetLogContents()java.lang.StringgetMainClass()The name of the class that should be started during StartupStepLaunchParentgetParent()java.lang.StringgetPlatformEdition()The platform edition.java.io.FilegetProjectCacheChkFile()java.io.FilegetProjectCacheFile()java.io.FilegetProjectCacheSignatureFile()This is the project snapshot that we can send to the gw to get changes.java.lang.StringgetProjectName()The name of the project.java.io.FilegetResourceDir()The base of the cached resources: %USER_HOME%/.ignition/cache/resources/java.lang.StringgetScopeCode()java.io.FilegetTranslationDBLocation()Returns the location of the cached translation term db file.byte[]getUserObject()Returns a serialized user object (if any) that was passed as part of a restartvoidlog(java.lang.String message, java.lang.Object... args)A shortcut for:voidsetAttribute(java.lang.String key, java.lang.Object value)voidsetDownloadRequiredManifest(LaunchManifest downloadRequiredManifest)voidsetGatewayAddress(GatewayAddress gatewayAddress)voidsetGatewayAddresses(java.util.List<GatewayAddress> gatewayAddresses)voidsetGwCacheDir(java.io.File gwCacheDir)voidsetLaunchManifest(LaunchManifest launchManifest)voidsetTranDBLocation(java.io.File tranDBLocation)voidupdateGatewayAddressListCache(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.voidupdateProjectCache(LaunchContext.WritableProject project)This overload of updateProjectCache takes a WriteableProject, which lets the project be streamed.
 
- 
- 
- 
Constructor Detail- 
LaunchContextImplpublic LaunchContextImpl(java.util.ResourceBundle bundle, LaunchSpec spec, java.io.File cacheDir, LaunchParent parent, java.util.Map<java.lang.String,java.lang.Object> attributes) throws LaunchException- Throws:
- LaunchException
 
 
- 
 - 
Method Detail- 
getScopeCodepublic java.lang.String getScopeCode() - Specified by:
- getScopeCodein interface- LaunchContext
 
 - 
getBundlepublic java.util.ResourceBundle getBundle() 
 - 
getCacheDirpublic java.io.File getCacheDir() Description copied from interface:LaunchContextThe base of the cache dirs: %USER_HOME%/.ignition/cache/- Specified by:
- getCacheDirin interface- LaunchContext
 
 - 
getResourceDirpublic java.io.File getResourceDir() Description copied from interface:LaunchContextThe base of the cached resources: %USER_HOME%/.ignition/cache/resources/- Specified by:
- getResourceDirin interface- LaunchContext
 
 - 
logpublic void log(java.lang.String message, java.lang.Object... args)Description copied from interface:LaunchContextA shortcut for:getLog().printf(message, args); getLog().println(); - Specified by:
- login interface- LaunchContext
 
 - 
getLogpublic java.io.PrintWriter getLog() Description copied from interface:LaunchContextA 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.- Specified by:
- getLogin interface- LaunchContext
 
 - 
getLogContentspublic java.lang.String getLogContents() 
 - 
getTranslationDBLocationpublic java.io.File getTranslationDBLocation() Description copied from interface:LaunchContextReturns 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.- Specified by:
- getTranslationDBLocationin interface- LaunchContext
 
 - 
setTranDBLocationpublic void setTranDBLocation(java.io.File tranDBLocation) 
 - 
getLaunchManifestpublic LaunchManifest getLaunchManifest() Description copied from interface:LaunchContextThis 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.- Specified by:
- getLaunchManifestin interface- LaunchContext
 
 - 
setLaunchManifestpublic void setLaunchManifest(LaunchManifest launchManifest) 
 - 
getDownloadRequiredManifestpublic LaunchManifest getDownloadRequiredManifest() 
 - 
setDownloadRequiredManifestpublic void setDownloadRequiredManifest(LaunchManifest downloadRequiredManifest) 
 - 
getGwCacheDirpublic java.io.File getGwCacheDir() Description copied from interface:LaunchContextThe 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.- Specified by:
- getGwCacheDirin interface- LaunchContext
 
 - 
setGwCacheDirpublic void setGwCacheDir(java.io.File gwCacheDir) 
 - 
getMainClasspublic java.lang.String getMainClass() Description copied from interface:LaunchContextThe name of the class that should be started during StartupStep- Specified by:
- getMainClassin interface- LaunchContext
 
 - 
getGatewayAddressespublic java.util.List<GatewayAddress> getGatewayAddresses() - Specified by:
- getGatewayAddressesin interface- LaunchContext
 
 - 
setGatewayAddressespublic void setGatewayAddresses(java.util.List<GatewayAddress> gatewayAddresses) 
 - 
updateGatewayAddressListCachepublic void updateGatewayAddressListCache(java.util.List<GatewayAddress> addrs) Description copied from interface:LaunchContextUpdates 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- Specified by:
- updateGatewayAddressListCachein interface- LaunchContext
 
 - 
getGatewayAddresspublic GatewayAddress getGatewayAddress() - Specified by:
- getGatewayAddressin interface- LaunchContext
 
 - 
setGatewayAddresspublic void setGatewayAddress(GatewayAddress gatewayAddress) 
 - 
getProjectNamepublic java.lang.String getProjectName() Description copied from interface:LaunchContextThe name of the project. May not be used in all scopes- Specified by:
- getProjectNamein interface- LaunchContext
 
 - 
getPlatformEditionpublic java.lang.String getPlatformEdition() Description copied from interface:LaunchContextThe platform edition. Standard edition = "", Edge edition = "edge"- Specified by:
- getPlatformEditionin interface- LaunchContext
 
 - 
getEdgeFlagspublic java.util.List<java.lang.String> getEdgeFlags() Description copied from interface:LaunchContextCurrently should return an empty list if edition is not edge.- Specified by:
- getEdgeFlagsin interface- LaunchContext
 
 - 
getProjectCacheFilepublic java.io.File getProjectCacheFile() - Specified by:
- getProjectCacheFilein interface- LaunchContext
 
 - 
getProjectCacheChkFilepublic java.io.File getProjectCacheChkFile() - Specified by:
- getProjectCacheChkFilein interface- LaunchContext
 
 - 
getProjectCacheSignatureFilepublic java.io.File getProjectCacheSignatureFile() This is the project snapshot that we can send to the gw to get changes.
 - 
updateProjectCachepublic void updateProjectCache(LaunchContext.WritableProject project) throws java.io.IOException Description copied from interface:LaunchContextThis overload of updateProjectCache takes a WriteableProject, which lets the project be streamed. We cannot remove the old byte[] version, because of re-targeting compatibility.- Specified by:
- updateProjectCachein interface- LaunchContext
- Throws:
- java.io.IOException
 
 - 
getParentpublic LaunchParent getParent() - Specified by:
- getParentin interface- LaunchContext
 
 - 
getUserObjectpublic byte[] getUserObject() Description copied from interface:LaunchContextReturns a serialized user object (if any) that was passed as part of a restart- Specified by:
- getUserObjectin interface- LaunchContext
 
 - 
getAttributepublic <T> T getAttribute(java.lang.String key) Description copied from interface:LaunchContextA 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.- Specified by:
- getAttributein interface- LaunchContext
 
 - 
getAttributepublic <T> T getAttribute(java.lang.String key, T defaultValue)- Specified by:
- getAttributein interface- LaunchContext
 
 - 
setAttributepublic void setAttribute(java.lang.String key, java.lang.Object value)- Specified by:
- setAttributein interface- LaunchContext
 
 - 
getAttributespublic java.util.Map<java.lang.String,java.lang.Object> getAttributes() Description copied from interface:LaunchContextRetrieves the raw attribute map- Specified by:
- getAttributesin interface- LaunchContext
 
 
- 
 
-