Package org.graylog.scheduler.rest
Class JobResourceHandlerService
java.lang.Object
org.graylog.scheduler.rest.JobResourceHandlerService
JobResourceHandlers provide a pluggable way to list and cancel Jobs that run within the new JobScheduler.
The main reason why this is currently not a generic solution, is that each Job implementation needs to
perform their own permission checks. That's why every call contains the current
UserContext
.
Another responsibility is converting JobTriggerDto
to SystemJobSummary
objects,
to cater the existing system job endpoints.
We might change this in the future, once we have a better idea on how to build a more generic job API.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
acknowledgeJob
(UserContext userContext, String jobId) cancelJob
(UserContext userContext, String jobId) cancelJobWithSystemJobSummary
(UserContext userContext, String jobId) getJob
(UserContext userContext, String jobId) getJobAsSystemJobSummery
(UserContext userContext, String jobId) jobSummaryFromTrigger
(JobTriggerDto trigger) listJobs
(UserContext userContext) listJobsAsSystemJobSummary
(UserContext userContext)
-
Constructor Details
-
JobResourceHandlerService
-
-
Method Details
-
listJobs
-
listJobsAsSystemJobSummary
-
getJob
-
getJobAsSystemJobSummery
-
cancelJob
-
cancelJobWithSystemJobSummary
public Optional<SystemJobSummary> cancelJobWithSystemJobSummary(UserContext userContext, String jobId) -
acknowledgeJob
-
jobSummaryFromTrigger
-