com.google.appengine.tools.development.testing

## Class LocalTaskQueueTestConfig.ServletInvokingTaskCallback

- java.lang.Object
- - com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig.DeferredTaskCallback
  - - com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig.ServletInvokingTaskCallback

- Enclosing class:
    LocalTaskQueueTestConfig

      public abstract static class LocalTaskQueueTestConfig.ServletInvokingTaskCallback
      extends LocalTaskQueueTestConfig.DeferredTaskCallback

  A class to delegate incoming task queue callbacks to HttpServlets based on a provided mapping.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServletInvokingTaskCallback()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `executeNonDeferredRequest(URLFetchServicePb.URLFetchRequest req)` Broken out to make it easy for subclasses to provide their own behavior when the request payload is not a `DeferredTask`.
    `protected abstract HttpServlet` | `getDefaultServlet()`
    `protected abstract java.util.Map<java.lang.String,? extends HttpServlet>` | `getServletMap()`
    `void` | `initialize(java.util.Map<java.lang.String,java.lang.String> properties)`

    - ### Methods inherited from class com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig.DeferredTaskCallback

      `execute`

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

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

- - ### Constructor Detail

    - #### ServletInvokingTaskCallback

          public ServletInvokingTaskCallback()

  - ### Method Detail

    - #### initialize

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

      Overrides:
        `initialize` in class `LocalTaskQueueTestConfig.DeferredTaskCallback`

    - #### getServletMap

          protected abstract java.util.Map<java.lang.String,? extends HttpServlet> getServletMap()

      Returns:
        A mapping from url path to HttpServlet. Where url path is a string that looks like "/foo/bar" (It must start with a '/' and should not contain characters that are not allowed in the path portion of a url.)

    - #### getDefaultServlet

          protected abstract HttpServlet getDefaultServlet()

      Returns:
        A servlet that will be used if none of the ones from `getServletMap()` match.

    - #### executeNonDeferredRequest

          protected int executeNonDeferredRequest(URLFetchServicePb.URLFetchRequest req)

      Description copied from class: `LocalTaskQueueTestConfig.DeferredTaskCallback`
      Broken out to make it easy for subclasses to provide their own behavior when the request payload is not a `DeferredTask`.
      Overrides:
        `executeNonDeferredRequest` in class `LocalTaskQueueTestConfig.DeferredTaskCallback`