Package edu.ucsb.cs156.jobs.services
Interface JobContextConsumer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A concrete job: the code that runs asynchronously, receiving a
JobContext for logging.
Apps implement this interface (or pass a lambda) and hand instances to JobService.runAsJob(edu.ucsb.cs156.jobs.services.JobContextConsumer).-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(JobContext c) default StringName recorded on theJobrow and shown in the admin UI.default LongOptional scope: the id of the app-domain object this job belongs to.default StringOptional scope: the kind of app-domain object this job belongs to (e.g.
-
Method Details
-
accept
- Throws:
Exception
-
getJobName
Name recorded on theJobrow and shown in the admin UI. -
getScopeType
Optional scope: the kind of app-domain object this job belongs to (e.g."course"). Null (the default) means the job is unscoped. -
getScopeId
Optional scope: the id of the app-domain object this job belongs to.
-