Package com.carfey.ops.job
Interface SchedulableJob
-
- All Known Subinterfaces:
ConfigGeneratingJob,ConfigValidatingJob,InterruptableContextJob,InterruptableJob
public interface SchedulableJobThis is the single interface which must be implemented to make a class an Obsidian job which can be scheduled and executed.A single
execute(Context)method is where all job logic is implemented, and it should only return when all job activity is complete. This is important if a job starts a thread pool or uses asynchronous processing.Implementations can use the
Configurationannotation to define parameters that a job collects and/or requires. TheDescriptionannotation can be used to supply useful information about the job which is shown in the web app configuration screen.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSchedulableJob.AsyncJobUsed to annotate a class which implementsSchedulableJob, but is an asynchronous submission of an external process (e.g.static interfaceSchedulableJob.InitializableAnnotation to indicate a givenSchedulableJobshould be automatically initialized into Obsidian at startup.static interfaceSchedulableJob.InitializableChainAnnotationAnnotation to use withSchedulableJob.Initializablefor any chain initializations requested.static interfaceSchedulableJob.InitializableChainConditionAnnotationstatic interfaceSchedulableJob.RepeatableInitializableAnnotationstatic interfaceSchedulableJob.SchedulableUsed to annotate a class which does not implementSchedulableJob, but can still be executed.static interfaceSchedulableJob.ScheduledRunUsed to annotate a method to execute on a class annotated withSchedulableJob.Schedulable.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexecute(Context context)Execute the job.
-
-
-
Method Detail
-
execute
void execute(Context context) throws java.lang.Exception
Execute the job. This method should only return when all job activity is complete. This is important if a job starts a thread pool or uses asynchronous processing.- Parameters:
context- contains job configuration, execution information, etc.- Throws:
java.lang.Exception- any type of job failure which should mark the job Failed
-
-