Interface GenericApplication

  • All Known Implementing Classes:
    Application

    public interface GenericApplication
    An App Engine application (may be Java/Python).
    • Method Detail

      • getAppId

        String getAppId()
        Returns the application identifier
        Returns:
        application identifier
      • getVersion

        String getVersion()
        Returns the application version
        Returns:
        application version
      • getRuntime

        String getRuntime()
        Returns the runtime this application uses.
      • getModule

        String getModule()
        Returns the application module name or null if not specified.
      • getInstanceClass

        String getInstanceClass()
        Returns the application instance class name or null if not specified.
      • isPrecompilationEnabled

        boolean isPrecompilationEnabled()
        Returns whether precompilation is enabled for this application
        Returns:
        precompilation setting
      • getMimeTypeIfStatic

        String getMimeTypeIfStatic​(String path)
        Returns the mime-type if path corresponds to static content, null otherwise.
        Returns:
        mime-type, possibly null
      • getCronXml

        com.google.apphosting.utils.config.CronXml getCronXml()
        Returns the CronXml describing the applications' cron jobs.
        Returns:
        a cron descriptor, possibly empty or null
      • getQueueXml

        com.google.apphosting.utils.config.QueueXml getQueueXml()
        Returns the QueueXml describing the applications' task queues.
        Returns:
        a queue descriptor, possibly empty or null
      • getDispatchXml

        com.google.apphosting.utils.config.DispatchXml getDispatchXml()
        Returns the possibly empty DispatchXml descriptor for this application or null if none is configured.
      • getDosXml

        com.google.apphosting.utils.config.DosXml getDosXml()
        Returns the DosXml describing the applications' DoS entries.
        Returns:
        a dos descriptor, possibly empty or null
      • getIndexesXml

        com.google.apphosting.utils.config.IndexesXml getIndexesXml()
        Returns the IndexesXml describing the applications' indexes.
        Returns:
        an indexes descriptor, possibly empty or null
      • getBackendsXml

        com.google.apphosting.utils.config.BackendsXml getBackendsXml()
        Returns the BackendsXml describing the applications' backends.
        Returns:
        a backends descriptor, possibly empty or null
      • getApiVersion

        String getApiVersion()
        Returns the desired API version for the current application, or "none" if no API version was used.
        Throws:
        IllegalStateException - if createStagingDirectory has not been called.
      • getPath

        String getPath()
        Returns a path to an exploded WAR directory for the application. This may be a temporary directory.
        Returns:
        a not null path pointing to a directory
      • getStagingDir

        File getStagingDir()
        Returns the staging directory, or null if none has been created.
      • resetProgress

        void resetProgress()
      • createStagingDirectory

        File createStagingDirectory​(ApplicationProcessingOptions opts)
                             throws IOException
        Creates a new staging directory, if needed, or returns the existing one if already created.
        Parameters:
        opts - User-specified options for processing the application.
        Returns:
        staging directory
        Throws:
        IOException
      • createStagingDirectory

        File createStagingDirectory​(ApplicationProcessingOptions opts,
                                    File stagingDir)
                             throws IOException
        Creates (if necessary) and populates a user specified staging directory
        Parameters:
        opts - User-specified options for processing the application.
        stagingDir - User-specified staging directory (must be empty or not exist)
        Returns:
        staging directory
        Throws:
        IOException - if an error occurs trying to create or populate the staging directory
      • exportRepoInfoFile

        void exportRepoInfoFile()
        Generates source context file in the staging directory.

        Does nothing if the source directory is not in a Git repo or if the source context file already exists. If the operation fails, this function logs and continues. The deployment is never blocked if we can't generate the source context file.

      • cleanStagingDirectory

        void cleanStagingDirectory()
        deletes the staging directory, if one was created.
      • setDetailsWriter

        void setDetailsWriter​(PrintWriter detailsWriter)
      • statusUpdate

        void statusUpdate​(String message,
                          int amount)
      • statusUpdate

        void statusUpdate​(String message)
      • getAppYaml

        String getAppYaml()
        Returns the yaml string describing this application's configuration.
        Returns:
        application configuration yaml string