Package com.veeva.vault.sdk.api.job
Interface JobQueueOperation<T>
- Type Parameters:
T- success response object type
public interface JobQueueOperation<T>
Provides methods for configuring and executing a job submission.
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Starts the job submission process.onError(Consumer<JobOperationError> errorHandler) Optional: Specifies the code to execute if an error occurs during job submission.Optional: Specifies the code to execute upon successful job submission.
-
Method Details
-
onSuccess
Optional: Specifies the code to execute upon successful job submission. The consumer receives theJobQueueResultcontaining the JobId.- Parameters:
successHandler-Consumerlambda to handle a successful queueing operation- Returns:
- the current
JobQueueOperationinstance for method chaining
-
onError
Optional: Specifies the code to execute if an error occurs during job submission. The consumer receives theJobOperationErrordetailing the failure. If no error handler is specified, an exception is thrown on error.- Parameters:
errorHandler-Consumerlambda to handle theJobOperationError- Returns:
- the current
JobQueueOperationinstance for method chaining
-
execute
void execute()Starts the job submission process. This method is typically the last in the fluid chain, triggering the operation and invoking the configured callbacks upon completion.
-