Package com.google.apphosting.runtime
Class AppVersionFactory
java.lang.Object
com.google.apphosting.runtime.AppVersionFactory
AppVersionFactory constructs instances of
AppVersion. It contains all of the logic about how application
resources are laid out on the filesystem, and is responsible for
constructing a ClassLoader that can be used to load
resources and classes for a particular application.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for AppVersionFactory. -
Constructor Summary
ConstructorsConstructorDescriptionAppVersionFactory(NullSandboxPlugin sandboxPlugin, File sharedDirectory, String runtimeVersion, boolean defaultToNativeUrlStreamHandler, boolean forceUrlfetchUrlStreamHandler, boolean ignoreDaemonThreads, boolean useEnvVarsFromAppInfo, String fixedApplicationPath) Construct a newAppVersionFactory. -
Method Summary
Modifier and TypeMethodDescriptionstatic AppVersionFactory.Builderbuilder()static AppVersionFactory.BuildercreateAppVersion(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo, com.google.apphosting.utils.config.AppEngineWebXml appEngineWebXml, ApplicationEnvironment.RuntimeConfiguration configuration) Create anAppVersionfrom the specifiedAppInfoprotocol buffer.createAppVersionForTest(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo) Creates a newAppVersionwith a default RuntimeConfiguration.com.google.apphosting.utils.config.AppEngineWebXmlreadAppEngineWebXml(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo)
-
Constructor Details
-
AppVersionFactory
public AppVersionFactory(NullSandboxPlugin sandboxPlugin, File sharedDirectory, String runtimeVersion, boolean defaultToNativeUrlStreamHandler, boolean forceUrlfetchUrlStreamHandler, boolean ignoreDaemonThreads, boolean useEnvVarsFromAppInfo, @Nullable String fixedApplicationPath) Construct a newAppVersionFactory.
-
-
Method Details
-
builder
-
builderForTest
-
readAppEngineWebXml
public com.google.apphosting.utils.config.AppEngineWebXml readAppEngineWebXml(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo) throws FileNotFoundException - Throws:
FileNotFoundException
-
createAppVersion
public AppVersion createAppVersion(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo, com.google.apphosting.utils.config.AppEngineWebXml appEngineWebXml, ApplicationEnvironment.RuntimeConfiguration configuration) throws IOException Create anAppVersionfrom the specifiedAppInfoprotocol buffer.- Parameters:
appInfo- The application configuration.configuration- The runtime configuration for the application.- Throws:
FileNotFoundException- if any of the specified files cannot be found.IOException- if there is a problem verifying that the root directory fromappInfois already the current directory.
-
createAppVersionForTest
public AppVersion createAppVersionForTest(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo) throws IOException Creates a newAppVersionwith a default RuntimeConfiguration.- Parameters:
appInfo- The application configuration.- Throws:
FileNotFoundException- if appengine-web.xml cannot be read.IOException- if there is a problem verifying that the root directory fromappInfois already the current directory.
-