Class DevAppServerModulesCommon

java.lang.Object
com.google.appengine.tools.development.DevAppServerModulesCommon
Direct Known Subclasses:
DevAppServerModulesFilter, DevAppServerModulesFilter

public class DevAppServerModulesCommon extends Object
This filter intercepts all request sent to all module instances.

There are 6 different request types that this filter will see:

* DIRECT_BACKEND_REQUEST: a client request sent to a serving (non load balancing) backend instance.

* REDIRECT_REQUESTED: a request requesting a redirect in one of three ways 1) The request contains a BackendService.REQUEST_HEADER_BACKEND_REDIRECT header or parameter 2) The request is sent to a load balancing module instance. 3) The request is sent to a load balancing backend instance.

If the request specifies an instance with the BackendService.REQUEST_HEADER_INSTANCE_REDIRECT request header or parameter the filter verifies that the instance is available, obtains a serving permit and forwards the requests. If the instance is not available the filter responds with a 500 error.

If the request does not specify an instance the filter picks one, obtains a serving permit, and forwards the request. If no instance is available this filter responds with a 500 error.

* DIRECT_MODULE_REQUEST: a request sent directly to the listening port of a specific serving module instance. The filter verifies that the instance is available, obtains a serving permit and sends the request to the handler. If no instance is available this filter responds with a 500 error.

* REDIRECTED_BACKEND_REQUEST: a request redirected to a backend instance. The filter sends the request to the handler. The serving permit has already been obtained by this filter when performing the redirect.

* REDIRECTED_MODULE_REQUEST: a request redirected to a specific module instance. The filter sends the request to the handler. The serving permit has already been obtained when by filter performing the redirect.

* STARTUP_REQUEST: Internally generated startup request. The filter passes the request to the handler without obtaining a serving permit.

  • Constructor Details

    • DevAppServerModulesCommon

      public DevAppServerModulesCommon()
  • Method Details

    • injectBackendServiceCurrentApiInfo

      public static void injectBackendServiceCurrentApiInfo(String backendName, int backendInstance, Map<String,String> portMapping)
      Sets up ApiProxy attributes needed BackendService.