Class DeferredTaskContext (2.0.0)

public class DeferredTaskContext

Resources for managing DeferredTask.

Inheritance

java.lang.Object > DeferredTaskContext

Static Fields

DEFAULT_DEFERRED_URL

public static final String DEFAULT_DEFERRED_URL

The URL the DeferredTask servlet is mapped to by default.

Field Value
TypeDescription
String

RUNNABLE_TASK_CONTENT_TYPE

public static final String RUNNABLE_TASK_CONTENT_TYPE

The content type of a serialized DeferredTask.

Field Value
TypeDescription
String

Static Methods

getCurrentRequest()

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

Returns
TypeDescription
HttpServletRequest

getCurrentResponse()

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

Returns
TypeDescription
HttpServletResponse

getCurrentServlet()

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

Returns
TypeDescription
HttpServlet

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 is set to true the request will not be retried.

setDoNotRetry(boolean value)

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.

Parameter
NameDescription
valueboolean