Package org.ametys.core.schedule
Class AmetysJob
java.lang.Object
org.ametys.core.schedule.AmetysJob
- All Implemented Interfaces:
Job
@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class AmetysJob
extends Object
implements Job
Ametys implementation of a
Job which delegates the execution of the task to the right Schedulable-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static ContextThe cocoon environment context.protected static SchedulableExtensionPointThe extension point forSchedulablesprotected static SchedulerThe scheduler componentprotected static ServiceManagerThe service managerprotected static UserManagerThe user manager componentstatic final StringThe key for the last duration of theexecute(org.quartz.JobExecutionContext)method which is stored in theJobDataMapstatic final StringThe key for the previous fire time of this job which is stored in theJobDataMapstatic final StringThe key for the success state of the last execution of the job -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddispose()Releases and destroys used resourcesvoidexecute(JobExecutionContext context) static voidinitialize(ServiceManager serviceManager, Context context) Initialize the static fields.
-
Field Details
-
KEY_LAST_DURATION
The key for the last duration of theexecute(org.quartz.JobExecutionContext)method which is stored in theJobDataMap- See Also:
-
KEY_PREVIOUS_FIRE_TIME
The key for the previous fire time of this job which is stored in theJobDataMap- See Also:
-
KEY_SUCCESS
The key for the success state of the last execution of the job- See Also:
-
_serviceManager
The service manager -
_schedulableEP
The extension point forSchedulables -
_scheduler
The scheduler component -
_environmentContext
The cocoon environment context. -
_userManager
The user manager component
-
-
Constructor Details
-
AmetysJob
public AmetysJob()
-
-
Method Details
-
initialize
public static void initialize(ServiceManager serviceManager, Context context) throws ServiceException, ContextException Initialize the static fields.- Parameters:
serviceManager- The service managercontext- The context- Throws:
ServiceException- if an error occurs during the lookup of theSchedulableExtensionPointContextException- if environment context object not found
-
dispose
Releases and destroys used resources -
execute
- Specified by:
executein interfaceJob- Throws:
JobExecutionException
-