public class DeferredTaskContext
Resources for managing DeferredTask.
Static Fields
DEFAULT_DEFERRED_URL
public static final String DEFAULT_DEFERRED_URL
The URL the DeferredTask servlet is mapped to by default.
Field Value | |
---|---|
Type | Description |
String |
RUNNABLE_TASK_CONTENT_TYPE
public static final String RUNNABLE_TASK_CONTENT_TYPE
The content type of a serialized DeferredTask.
Field Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value |
boolean |