Package org.jobrunr.jobs.lambdas
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 actualJobRequest
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default JobContext
jobContext()
Gives access to the JobContext for the current job in a thread-safe manner.void
run(T jobRequest)
-
-
-
Method Detail
-
run
void run(T jobRequest) throws java.lang.Exception
- Throws:
java.lang.Exception
-
jobContext
default JobContext jobContext()
Gives access to the JobContext for the current job in a thread-safe manner. It will be available only during therun(JobRequest)
method.- Returns:
- the
JobContext
for the current Job
-
-