Package com.veeva.vault.sdk.api.job
Interface JobCancelOperation<T>
- Type Parameters:
T- success response object type
public interface JobCancelOperation<T>
A sequence of instructions that can be chained together,
building a job cancellation operation which can be executed with
execute().
Supplying a success handler via the withSuccessHandler(Consumer) method is optional.
Supplying an error handler via the withErrorHandler(Consumer) method is required.
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes this cancel job operation.withErrorHandler(Consumer<JobCancelOperationError> errorHandler) Required: Sets a callback for handling failed job cancellation requests.withSuccessHandler(Consumer<JobCancelResponse> successHandler) Optional: Sets a callback for handling successful job cancellation requests.
-
Method Details
-
withSuccessHandler
Optional: Sets a callback for handling successful job cancellation requests.If omitted, successful statements are ignored.
- Parameters:
successHandler- the callback to invoke for successful job cancellation requests. Cannot be null.- Returns:
- this Builder
-
withErrorHandler
Required: Sets a callback for handling failed job cancellation requests.- Parameters:
errorHandler- the callback to invoke for failed job cancellation requests. Cannot be null.- Returns:
- this Builder
-
execute
void execute()Executes this cancel job operation.
-