Class LocalEnvironment

java.lang.Object
com.google.appengine.tools.development.LocalEnvironment
All Implemented Interfaces:
ApiProxy.Environment
Direct Known Subclasses:
AbstractContainerService.LocalInitializationEnvironment, LocalHttpRequestEnvironment, LocalHttpRequestEnvironment

public abstract class LocalEnvironment extends Object implements ApiProxy.Environment
LocalEnvironment is a simple ApiProxy.Environment that reads application-specific details (e.g. application identifer) directly from the custom deployment descriptor.
  • Field Details

    • TESTING_DEFAULT_PORT

      public static final Integer TESTING_DEFAULT_PORT
    • INSTANCE_ID_ENV_ATTRIBUTE

      public static final String INSTANCE_ID_ENV_ATTRIBUTE
      See Also:
    • PORT_ID_ENV_ATTRIBUTE

      public static final String PORT_ID_ENV_ATTRIBUTE
      See Also:
    • API_CALL_SEMAPHORE

      public static final String API_CALL_SEMAPHORE
      ApiProxy.Environment instances used with ApiProxyLocalFactory should have a entry in the map returned by getAttributes() with this key, and a Semaphore as the value. This is used internally to track asynchronous API calls.
      See Also:
    • REQUEST_ID

      public static final String REQUEST_ID
      The name of an attribute that contains a (String) unique identifier for the curent request.
      See Also:
    • START_TIME_ATTR

      public static final String START_TIME_ATTR
      The name of an attribute that contains a a Date object representing the time this request was started.
      See Also:
    • REQUEST_END_LISTENERS

      public static final String REQUEST_END_LISTENERS
      The name of an attribute that contains a Set<RequestEndListener>. The set of RequestEndListeners is populated by from within the service calls. The listeners are invoked at the end of a user request.
      See Also:
    • HTTP_SERVLET_REQUEST

      public static final String HTTP_SERVLET_REQUEST
      The name of an attribute that contains the HttpServletRequest instance.
      See Also:
    • DEFAULT_VERSION_HOSTNAME

      public static final String DEFAULT_VERSION_HOSTNAME
      In production, this is a constant that defines the attribute name that contains the hostname on which the default version is listening. In the local development server, the attribute contains the listening port in addition to the hostname, and is the one and only frontend app instance hostname and port.
      See Also:
    • MAIN_INSTANCE

      public static final int MAIN_INSTANCE
      Instance number for a main instance.

      Clients depend on this literal having the value -1 so do not change this value without making needed updates to clients.

      See Also:
  • Method Details