Package com.google.apphosting.runtime
Class AppVersionFactory
- java.lang.Object
-
- com.google.apphosting.runtime.AppVersionFactory
-
public class AppVersionFactory extends Object
AppVersionFactoryconstructs instances ofAppVersion. It contains all of the logic about how application resources are laid out on the filesystem, and is responsible for constructing aClassLoaderthat can be used to load resources and classes for a particular application.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAppVersionFactory.BuilderBuilder for AppVersionFactory.
-
Constructor Summary
Constructors Constructor Description AppVersionFactory(NullSandboxPlugin sandboxPlugin, File sharedDirectory, String runtimeVersion, boolean defaultToNativeUrlStreamHandler, boolean forceUrlfetchUrlStreamHandler, boolean ignoreDaemonThreads, boolean useEnvVarsFromAppInfo, String fixedApplicationPath)Construct a newAppVersionFactory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AppVersionFactory.Builderbuilder()static AppVersionFactory.BuilderbuilderForTest()AppVersioncreateAppVersion(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo, com.google.apphosting.utils.config.AppEngineWebXml appEngineWebXml, ApplicationEnvironment.RuntimeConfiguration configuration)Create anAppVersionfrom the specifiedAppInfoprotocol buffer.AppVersioncreateAppVersionForTest(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 Detail
-
AppVersionFactory
public AppVersionFactory(NullSandboxPlugin sandboxPlugin, File sharedDirectory, String runtimeVersion, boolean defaultToNativeUrlStreamHandler, boolean forceUrlfetchUrlStreamHandler, boolean ignoreDaemonThreads, boolean useEnvVarsFromAppInfo, @Nullable String fixedApplicationPath)
Construct a newAppVersionFactory.
-
-
Method Detail
-
builder
public static AppVersionFactory.Builder builder()
-
builderForTest
public static AppVersionFactory.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.
-
-