Class DeferredTaskContext

java.lang.Object
com.google.appengine.api.taskqueue.jakarta.DeferredTaskContext

public class DeferredTaskContext extends Object
Resources for managing
invalid reference
DeferredTask
.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The URL the DeferredTask servlet is mapped to by default.
    static final String
    The content type of a serialized
    invalid reference
    DeferredTask
    .
  • Method Summary

    Modifier and Type
    Method
    Description
    static jakarta.servlet.http.HttpServletRequest
    Returns the HttpServletRequest instance for the current running deferred task for the current thread or null if there is no current deferred task active for this thread.
    static jakarta.servlet.http.HttpServletResponse
    Returns the HttpServletResponse instance for the current running deferred task for the current thread or null if there is no current deferred task active for this thread.
    static jakarta.servlet.http.HttpServlet
    Returns the HttpServlet instance for the current running deferred task for the current thread or null if there is no current deferred task active for this thread.
    static void
    Request a retry of this task, even if an exception was not thrown.
    static void
    setDoNotRetry(boolean value)
    Sets the action on task failure.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RUNNABLE_TASK_CONTENT_TYPE

      public static final String RUNNABLE_TASK_CONTENT_TYPE
      The content type of a serialized
      invalid reference
      DeferredTask
      .
      See Also:
    • DEFAULT_DEFERRED_URL

      public static final String DEFAULT_DEFERRED_URL
      The URL the DeferredTask servlet is mapped to by default.
      See Also:
  • Method Details

    • getCurrentServlet

      public static jakarta.servlet.http.HttpServlet getCurrentServlet()
      Returns the HttpServlet instance for the current running deferred task for the current thread or null if there is no current deferred task active for this thread.
    • getCurrentRequest

      public static jakarta.servlet.http.HttpServletRequest getCurrentRequest()
      Returns the HttpServletRequest instance for the current running deferred task for the current thread or null if there is no current deferred task active for this thread.
    • getCurrentResponse

      public static jakarta.servlet.http.HttpServletResponse getCurrentResponse()
      Returns the HttpServletResponse instance for the current running deferred task for the current thread or null if there is no current deferred task active for this thread.
    • setDoNotRetry

      public static void setDoNotRetry(boolean value)
      Sets the action on task failure. Normally when an exception is thrown, the task will be retried, however if setDoNotRetry is set to true, the task will not be retried.
    • markForRetry

      public static void markForRetry()
      Request a retry of this task, even if an exception was not thrown. If an exception was thrown and setDoNotRetry(boolean) is set to true the request will not be retried.