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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(RequestExecutionContext context, RequestParameters requestParams) Invoked by Enterprise Scheduler when a job request is cancelled.
-
Method Details
-
cancel
Invoked by Enterprise Scheduler when a job request is cancelled. This method must eventually return control to the caller.- Parameters:
context- the request execution contextrequestParams- the request parameters
-