Interface JobRequestHandler<T extends JobRequest>
- Type Parameters:
T- A JobRequest implementation that can have extra fields and methods to be used by theJobRequestHandler.
public interface JobRequestHandler<T extends JobRequest>
Classes implementing this interface will handle the actual
JobRequest.-
Method Summary
Modifier and TypeMethodDescriptiondefault JobContextDeprecated.voidThe actual job processing to perform.
-
Method Details
-
run
The actual job processing to perform.- Parameters:
jobRequest- theJobRequestto be processed- Throws:
Exception- if an error occurs during the processing, JobRunr will automatically retry the job.
-
jobContext
Deprecated.useThreadLocalJobContextinsteadGives access to the JobContext for the current job in a thread-safe manner. It will be available only during therun(JobRequest)method.- Returns:
- the
JobContextfor the current Job
-
ThreadLocalJobContextinstead