Package org.jobrunr.jobs.filters
Interface JobServerFilter
- All Superinterfaces:
JobFilter
A filter that is triggered each time that:
- a Job starts processing
- a Job has been processed
- a Job succeeds
- a Job fails
- a Job fails after all retries are exhausted
Can be useful for adding extra logging, ... .
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
onFailedAfterRetries
(Job job) This hook is called when a Job failed and will not be retried anymore (due to the fact that the retries are exhausted).default void
onProcessed
(Job job) Deprecated.default void
onProcessing
(Job job) This hook is called when the Job starts processingdefault void
onProcessingFailed
(Job job, Exception e) This hook is called when the Job processing failed (note that the job still has thePROCESSING
state).default void
onProcessingSucceeded
(Job job) This hook is called when the Job processing succeeded (note that the job still has thePROCESSING
state).
-
Method Details
-
onProcessing
This hook is called when the Job starts processing- Parameters:
job
- the job that will be processed
-
onProcessed
Deprecated.Please useonProcessingSucceeded(Job)
This hook is called when the Job processing succeeded (note that the job still has thePROCESSING
state).- Parameters:
job
- the job that has been processed successfully.
-
onProcessingSucceeded
This hook is called when the Job processing succeeded (note that the job still has thePROCESSING
state).- Parameters:
job
- the job that has been processed successfully.
-
onProcessingFailed
This hook is called when the Job processing failed (note that the job still has thePROCESSING
state).- Parameters:
job
- the job that has been processed successfully.e
- the exception that occurred.
-
onFailedAfterRetries
This hook is called when a Job failed and will not be retried anymore (due to the fact that the retries are exhausted).- Parameters:
job
- the job that failed.
-
onProcessingSucceeded(Job)