com.google.appengine.tools.development

## Class AbstractContainerService

- java.lang.Object
- - com.google.appengine.tools.development.AbstractContainerService

- All Implemented Interfaces:
    ContainerService

      public abstract class AbstractContainerService
      extends java.lang.Object
      implements ContainerService

  Common implementation for the `ContainerService` interface. There should be no reference to any third-party servlet container from here.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `AbstractContainerService.LocalInitializationEnvironment` A fake `LocalEnvironment` implementation that is used during the initialization of the Development AppServer.

    - ### Nested classes/interfaces inherited from interface com.google.appengine.tools.development.ContainerService

      `ContainerService.EnvironmentVariableMismatchSeverity`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractContainerService()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.appengine.tools.development.LocalServerEnvironment` | `configure(java.lang.String devAppServerVersion, java.io.File appDir, java.io.File externalResourceDir, java.io.File webXmlLocation, java.io.File appEngineWebXmlLocation, java.lang.String address, int port, java.util.Map<java.lang.String,java.lang.Object> containerConfigProperties, DevAppServer devAppServer)` Sets up the necessary configuration parameters.
    `java.lang.String` | `getAddress()` Returns the listener network address, however it's decided during the servlet container deployment.
    `AppEngineWebXml` | `getAppEngineWebXmlConfig()` Return the AppEngineWebXml configuration of this container
    `BackendsXml` | `getBackendsXml()`
    `java.lang.String` | `getHostName()` Returns the host name of the server, however it's decided during the the servlet container deployment.
    `int` | `getPort()` Returns the listener port number, however it's decided during the servlet container deployment.
    `java.util.Map<java.lang.String,java.lang.String>` | `getServiceProperties()`
    `void` | `setEnvironmentVariableMismatchSeverity(ContainerService.EnvironmentVariableMismatchSeverity val)` Overrides the default EnvironmentVariableMismatchSeverity setting, to disable exceptions during the testing.
    `void` | `shutdown()` Shuts down the servlet container.
    `void` | `startup()` This is made final, and detail implementation (that is specific to any particular servlet container) goes to individual "template" methods.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.google.appengine.tools.development.ContainerService

      `getAppContext`

- - ### Constructor Detail

    - #### AbstractContainerService

          public AbstractContainerService()

  - ### Method Detail

    - #### configure

          public final com.google.appengine.tools.development.LocalServerEnvironment configure(java.lang.String devAppServerVersion,
                                                                                java.io.File appDir,
                                                                                java.io.File externalResourceDir,
                                                                                java.io.File webXmlLocation,
                                                                                java.io.File appEngineWebXmlLocation,
                                                                                java.lang.String address,
                                                                                int port,
                                                                                java.util.Map<java.lang.String,java.lang.Object> containerConfigProperties,
                                                                                DevAppServer devAppServer)

      Description copied from interface: `ContainerService`
      Sets up the necessary configuration parameters.
      Specified by:
        `configure` in interface `ContainerService`
      Parameters:
        `devAppServerVersion` - Version of the devAppServer.
        `appDir` - The location of the application to run.
        `externalResourceDir` - If not `null`, a resource directory external to the appDir. This will be searched before appDir when looking for resources.
        `webXmlLocation` - The location of a file whose format complies with http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd. If null we will use /WEB-INF/web.xml.
        `appEngineWebXmlLocation` - The location of the app engine config file. If null we will use /WEB-INF/appengine-web.xml.
        `address` - The address on which the server will run
        `port` - The port to which the server will be bound. If 0, an available port will be selected.
        `containerConfigProperties` - Additional properties used in the configuration of the specific container implementation. This map travels across classloader boundaries, so all values in the map must be JRE classes.
      Returns:
        A LocalServerEnvironment describing the environment in which the server is running.

    - #### startup

          public final void startup()
                             throws java.lang.Exception

      This is made final, and detail implementation (that is specific to any particular servlet container) goes to individual "template" methods.
      Specified by:
        `startup` in interface `ContainerService`
      Throws:
        `java.lang.Exception` - Any exception from the container will be rethrown as is.

    - #### shutdown

          public final void shutdown()
                              throws java.lang.Exception

      Description copied from interface: `ContainerService`
      Shuts down the servlet container.
      Specified by:
        `shutdown` in interface `ContainerService`
      Throws:
        `java.lang.Exception` - Any exception from the container will be rethrown as is.

    - #### getServiceProperties

          public java.util.Map<java.lang.String,java.lang.String> getServiceProperties()

      Specified by:
        `getServiceProperties` in interface `ContainerService`
      Returns:
        the map of properties to be passed to each service.

    - #### getAddress

          public java.lang.String getAddress()

      Description copied from interface: `ContainerService`
      Returns the listener network address, however it's decided during the servlet container deployment.
      Specified by:
        `getAddress` in interface `ContainerService`

    - #### getAppEngineWebXmlConfig

          public AppEngineWebXml getAppEngineWebXmlConfig()

      Description copied from interface: `ContainerService`
      Return the AppEngineWebXml configuration of this container
      Specified by:
        `getAppEngineWebXmlConfig` in interface `ContainerService`

    - #### getBackendsXml

          public BackendsXml getBackendsXml()

      Specified by:
        `getBackendsXml` in interface `ContainerService`

    - #### getPort

          public int getPort()

      Description copied from interface: `ContainerService`
      Returns the listener port number, however it's decided during the servlet container deployment.
      Specified by:
        `getPort` in interface `ContainerService`

    - #### getHostName

          public java.lang.String getHostName()

      Description copied from interface: `ContainerService`
      Returns the host name of the server, however it's decided during the the servlet container deployment.
      Specified by:
        `getHostName` in interface `ContainerService`

    - #### setEnvironmentVariableMismatchSeverity

          public void setEnvironmentVariableMismatchSeverity(ContainerService.EnvironmentVariableMismatchSeverity val)

      Description copied from interface: `ContainerService`
      Overrides the default EnvironmentVariableMismatchSeverity setting, to disable exceptions during the testing.
      Specified by:
        `setEnvironmentVariableMismatchSeverity` in interface `ContainerService`
      Parameters:
        `val` - The new EnvironmentVariableMismatchSeverity.
      See Also:
        `ContainerService.EnvironmentVariableMismatchSeverity`