Skip navigation links

Oracle Enterprise Scheduler Java API Reference
11g Release 1 (11.1.1.7)
E26229-06


oracle.as.scheduler
Interface PreProcessHandler


public interface PreProcessHandler

Contract for a client application callback that is invoked before execution of a job request executable.

A client application specifies a pre-process callback class by setting the PRE_PROCESS system property, via either metadata or at request submission. The callback class may also implement the Cancellable interface. The class must provide an empty constructor.

The class object is instantiated at the start of request execution. The preProcess method will be called when the request has transitioned to RUNNING state.

Enterprise Scheduler creates a new instance of the callback class each time a submitted job request is executed. As such, the job implementation should not rely on class static or instance member variables for maintaining state.

See Also:
Executable, State

Method Summary
 HandlerAction preProcess(RequestExecutionContext context, RequestParameters parameters)
          Invoked before the job request executable is executed.

 

Method Detail

preProcess

HandlerAction preProcess(RequestExecutionContext context,
                         RequestParameters parameters)
Invoked before the job request executable is executed. This method is called by Enterprise Scheduler when the request transitions to RUNNING state. It must return control to the caller and its return value is used to determine how subsequent request processing should proceed.

This method is called each time a given request is executed. For example, it is called each time a failed request is retried, or a paused request is resumed after sub-requests have completed.

Parameters:
context - the execution context associated with this request
parameters - the request parameters associated with this request
Returns:
a HandlerAction whose associated status value indicates the status of this callout. The result will be used to determine how request processing will proceed. Any action other than those listed below is not supported and will cause the request to transition to an error state and be subject to retries if configured.
  • PROCEED to inform the Scheduler that request processing should commence. The request will remain in RUNNING state.
  • WARN to inform the Scheduler that request processing should commence but that a warning should be logged. The request will remain in RUNNING state.
  • CANCEL to inform the Scheduler that request pre-processing has been cancelled. The request will transition to CANCELLED state.
  • DELAY to inform the Scheduler to postpone request processing by the quantum of time specified by the REPROCESS_DELAY system property. The request remains in RUNNING state during the delay.
  • SYSTEM_ERROR to inform the Scheduler that the handler has experienced an error. The request will transition to an error state and is subject to retries if configured.
  • BIZ_ERROR to inform the Scheduler that the handler has experienced a business error. The request will transition to an error state not subject to retries.
See Also:
State

Skip navigation links

Oracle Enterprise Scheduler Java API Reference
11g Release 1 (11.1.1.7)
E26229-06


Copyright © 2008, 2013, Oracle and/or its affiliates. All rights reserved.