Class DeferredTaskContext

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.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.
      static javax.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.
      static javax.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.
      static void markForRetry()
      Request a retry of this task, even if an exception was not thrown.
      static void setDoNotRetry​(boolean value)
      Sets the action on task failure.
    • Method Detail

      • getCurrentServlet

        public static javax.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 javax.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 javax.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.