Class AppVersionFactory

java.lang.Object
com.google.apphosting.runtime.AppVersionFactory

public class AppVersionFactory extends Object
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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Builder for AppVersionFactory.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AppVersionFactory(com.google.apphosting.runtime.NullSandboxPlugin sandboxPlugin, File sharedDirectory, String runtimeVersion, boolean defaultToNativeUrlStreamHandler, boolean forceUrlfetchUrlStreamHandler, boolean ignoreDaemonThreads, boolean useEnvVarsFromAppInfo, @Nullable String fixedApplicationPath)
    Construct a new AppVersionFactory.
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    createAppVersion(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo, com.google.apphosting.utils.config.AppEngineWebXml appEngineWebXml, com.google.apphosting.runtime.ApplicationEnvironment.RuntimeConfiguration configuration)
    Create an AppVersion from the specified AppInfo protocol buffer.
    createAppVersionForTest(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo)
    Creates a new AppVersion with a default RuntimeConfiguration.
    com.google.apphosting.utils.config.AppEngineWebXml
    readAppEngineWebXml(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AppVersionFactory

      public AppVersionFactory(com.google.apphosting.runtime.NullSandboxPlugin sandboxPlugin, File sharedDirectory, String runtimeVersion, boolean defaultToNativeUrlStreamHandler, boolean forceUrlfetchUrlStreamHandler, boolean ignoreDaemonThreads, boolean useEnvVarsFromAppInfo, @Nullable String fixedApplicationPath)
      Construct a new AppVersionFactory.
  • Method Details

    • 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, com.google.apphosting.runtime.ApplicationEnvironment.RuntimeConfiguration configuration) throws IOException
      Create an AppVersion from the specified AppInfo protocol 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 from appInfo is already the current directory.
    • createAppVersionForTest

      public AppVersion createAppVersionForTest(com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo) throws IOException
      Creates a new AppVersion with 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 from appInfo is already the current directory.