public interface AsyncRequestBeanInterface
Modifier and Type | Method and Description |
---|---|
boolean |
checkInCancelling(RequestExecutionContext context)
Checks if a cancel operation has been initiated for the given request.
|
RequestExecutionContext |
getContextFromString(String string)
Converts the string representation of a RequestExecutionContext into RequestExecutionContext object.
|
void |
setRequestStatus(RequestExecutionContext context, AsyncStatus status, String statusMessage)
Set the status of an ESS asynchronous java job.
|
void setRequestStatus(RequestExecutionContext context, AsyncStatus status, String statusMessage) throws RuntimeServiceException, RequestNotFoundException
context
- The RequestExecutionContext
with which the request was started.status
- The status of the request.statusMessage
- An error message if the status is ERROR, a warning message if the status is WARNING, the paused state if the status is PAUSED. The value will be ignored if the status is SUCCESS or CANCEL.RequestNotFoundException
- If a request is not found for the context
.RuntimeServiceException
- if an error occurred.RequestExecutionContext getContextFromString(String string) throws RuntimeServiceException, RequestNotFoundException
RequestExecutionContext.toString()
string
- the String to convert to a context.RequestNotFoundException
- If a request is not found for the context
.RuntimeServiceException
- if an error occurred.boolean checkInCancelling(RequestExecutionContext context) throws RequestNotFoundException, RuntimeServiceException
The time since a cancel operation is initiated for request is tracked. The purpose is to only allow certain types of recovery operations N minutes after a cancel is invoked. However, invoking this method will reset the timer since it is seen as an indication that the job is still active.
Thus if the time limit is 10 minutes and the job checks in to ESS 8 minutes after cancel was initiated, the timer will be set back to 0, allowing 10 more minutes.
context
- the execution context of the running request that is being checked.true
if a cancel operation has been initated for this request, false
otherwise.RequestNotFoundException
- if the request was not foundRuntimeServiceException
- if a RuntimeService subsystem failure occurs