Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.tools.development
Interface DevAppServer

    public interface DevAppServer

`DevAppServer` launches a local Jetty server (by default) with a single hosted web application. It can be invoked from the command-line by providing the path to the directory in which the application resides as the only argument. Over time, the environment provided by this class should come to resemble the environment provided to hosted applications in production. For example, stub applications of all of the API's should be provided, and similar security restrictions should be enforced.

Field Summary
`static java.lang.String` | `DEFAULT_HTTP_ADDRESS` `DevAppServer` listens on this network address for incoming HTTP requests.
`static int` | `DEFAULT_HTTP_PORT` `DevAppServer` listens on this port for incoming HTTP requests.

Method Summary
`int` | `getPort()`
`java.security.Permissions` | `getUserPermissions()` Returns a `Permissions` object containing `UnresolvedPermission` instances for every permission that was requested by the user in their `appengine-web.xml` file.
`java.lang.Object` | `getWebAppContext()` Returns the web app context.
`void` | `restart()` Restart the server to reload disk and class changes.
`void` | `setServiceProperties(java.util.Map<java.lang.String,java.lang.String> properties)` Sets the properties that will be used by the local services to configure themselves.
`void` | `setThrowOnEnvironmentVariableMismatch(boolean throwOnMismatch)` Reset the container EnvironmentVariableMismatchSeverity.
`void` | `shutdown()` Shut down the server.
`void` | `start()` Starts the server.

Field Detail

### DEFAULT_HTTP_ADDRESS

    static final java.lang.String DEFAULT_HTTP_ADDRESS

  `DevAppServer` listens on this network address for incoming HTTP requests. This can be overriden with `--address=<addr>`.

  See Also:
    Constant Field Values

### DEFAULT_HTTP_PORT

    static final int DEFAULT_HTTP_PORT

  `DevAppServer` listens on this port for incoming HTTP requests. This can be overriden with `--port=NNNN`.

  See Also:
    Constant Field Values

Method Detail

### setServiceProperties

    void setServiceProperties(java.util.Map<java.lang.String,java.lang.String> properties)

  Sets the properties that will be used by the local services to configure themselves. This method must be called before the server has been started.

  Parameters:
    `properties` - a, maybe `null`, set of properties.
  Throws:
    `java.lang.IllegalStateException` - if the server has already been started.

### start

    void start()
               throws java.lang.Exception

  Starts the server.

  Throws:
    `java.lang.IllegalStateException` - If the server has already been started or shutdown.
    `com.google.apphosting.utils.config.AppEngineConfigException` - If no WEB-INF directory can be found or WEB-INF/appengine-web.xml does not exist.
    `java.lang.Exception`

### restart

    void restart()
                 throws java.lang.Exception

  Restart the server to reload disk and class changes.

  Throws:
    `java.lang.IllegalStateException` - If the server has not been started or has already been shutdown.
    `java.lang.Exception`

### shutdown

    void shutdown()
                  throws java.lang.Exception

  Shut down the server.

  Throws:
    `java.lang.IllegalStateException` - If the server has not been started or has already been shutdown.
    `java.lang.Exception`

### getPort

    int getPort()

  Returns:
    the servlet container listener port number.

### getWebAppContext

    java.lang.Object getWebAppContext()

  Returns the web app context. Useful in embedding scenarios to allow the embedder to install servlets, etc. Any such modification should be done before calling `start()`.

  See Also:
    `ContainerService.getWebAppContext()`

### setThrowOnEnvironmentVariableMismatch

    void setThrowOnEnvironmentVariableMismatch(boolean throwOnMismatch)

  Reset the container EnvironmentVariableMismatchSeverity.

### getUserPermissions

    java.security.Permissions getUserPermissions()

  Returns a `Permissions` object containing `UnresolvedPermission` instances for every permission that was requested by the user in their `appengine-web.xml` file.

  Note that user code will not actually running with these permissions. However, to user-provided code that calls `SecurityManager.checkPermission` directly it will appear that it is. This is designed primarily for third-party libraries that introduce their own `Permission` subclasses that are not used by any other classes.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD