Class LocalTaskQueueTestConfig.DeferredTaskCallback
java.lang.Object
com.google.appengine.tools.development.testing.jakarta.LocalTaskQueueTestConfig.DeferredTaskCallback
- All Implemented Interfaces:
LocalTaskQueueCallback,Serializable
- Direct Known Subclasses:
LocalTaskQueueTestConfig.ServletInvokingTaskCallback
- Enclosing class:
LocalTaskQueueTestConfig
public static class LocalTaskQueueTestConfig.DeferredTaskCallback
extends Object
implements LocalTaskQueueCallback
A
LocalTaskQueueCallback implementation that automatically detects
and runs tasks with a DeferredTask payload.
Requests with a payload that is not a DeferredTask are dispatched
to executeNonDeferredRequest(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest), which by default does nothing.
If you need to handle a payload like this you can extend the class and
override this method to do what you need.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintExecute the provided url fetch request.voidinitialize(Map<String, String> properties) This method will be invoked fromLocalTaskQueue.init(com.google.appengine.tools.development.LocalServiceContext, Map)forwarding thepropertiesparameter.
-
Constructor Details
-
DeferredTaskCallback
public DeferredTaskCallback()
-
-
Method Details
-
initialize
Description copied from interface:LocalTaskQueueCallbackThis method will be invoked fromLocalTaskQueue.init(com.google.appengine.tools.development.LocalServiceContext, Map)forwarding thepropertiesparameter.- Specified by:
initializein interfaceLocalTaskQueueCallback
-
execute
Description copied from interface:LocalTaskQueueCallbackExecute the provided url fetch request.- Specified by:
executein interfaceLocalTaskQueueCallback- Parameters:
req- The url fetch request- Returns:
- The HTTP status code of the fetch.
-