public interface AsyncCancellable
When a job request is cancelled, Oracle Enterprise Scheduler determines if the client class implements the AsyncCancellable interface, and if so, calls the cancel method to notify the client class of the request cancellation.
Important: This interface differs from the normal Cancellable interface in that the cancel method has a RequestExecutionContext parameter. This is because the physical Java object on which ESS calls execute may not be the same object on which ESS calls cancel due to restarts (i.e. the asynchronous job may have started, the server restarted, and then the job cancelled). The provided context allows the client to correlate the job to be cancelled with whatever agent is running the actual job.
The client is responsible for stopping that agent and then notifying Oracle Enterprise Scheduler of the result. This an be accomplished using the webservice setAsyncRequestStatus operation, AsyncHelper.onCancel or by directly invoking the AsyncRequestBeanRemote.setRequestStatus.
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(RequestExecutionContext context, RequestParameters requestParams)
Invoked by Enterprise Scheduler when a job request is cancelled.
|
void cancel(RequestExecutionContext context, RequestParameters requestParams)
context - the request execution contextrequestParams - the request parameters