Class 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.
    • Constructor Detail

      • AppVersionFactory

        public AppVersionFactory​(NullSandboxPlugin sandboxPlugin,
                                 File sharedDirectory,
                                 String runtimeVersion,
                                 boolean defaultToNativeUrlStreamHandler,
                                 boolean forceUrlfetchUrlStreamHandler,
                                 boolean ignoreDaemonThreads,
                                 boolean useEnvVarsFromAppInfo,
                                 @Nullable
                                 String fixedApplicationPath)
        Construct a new AppVersionFactory.
    • Method Detail

      • 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 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.