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
-
- All Implemented Interfaces:
- LocalTaskQueueCallback, java.io.Serializable
- 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.- See Also:
- Serialized Form
-
-
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 aDeferredTask
.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)
This method will be invoked fromLocalTaskQueue#init(com.google.appengine.tools.development.LocalServiceContext, Map)
forwarding theproperties
parameter.-
Methods inherited from class com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig.DeferredTaskCallback
execute
-
-
-
-
Method Detail
-
initialize
public void initialize(java.util.Map<java.lang.String,java.lang.String> properties)
Description copied from interface:LocalTaskQueueCallback
This method will be invoked fromLocalTaskQueue#init(com.google.appengine.tools.development.LocalServiceContext, Map)
forwarding theproperties
parameter.- Specified by:
initialize
in interfaceLocalTaskQueueCallback
- Overrides:
initialize
in classLocalTaskQueueTestConfig.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 aDeferredTask
.- Overrides:
executeNonDeferredRequest
in classLocalTaskQueueTestConfig.DeferredTaskCallback
-
-