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 aJobwhich delegates the execution of the task to the rightSchedulable
- 
- 
Field SummaryFields Modifier and Type Field Description protected static Context_environmentContextThe cocoon environment context.protected static SchedulableExtensionPoint_schedulableEPThe extension point forSchedulablesprotected static Scheduler_schedulerThe scheduler componentprotected static ServiceManager_serviceManagerThe service managerprotected static UserManager_userManagerThe user manager componentstatic StringKEY_LAST_DURATIONThe key for the last duration of theexecute(org.quartz.JobExecutionContext)method which is stored in theJobDataMapstatic StringKEY_PREVIOUS_FIRE_TIMEThe key for the previous fire time of this job which is stored in theJobDataMapstatic StringKEY_SUCCESSThe key for the success state of the last execution of the job
 - 
Constructor SummaryConstructors Constructor Description AmetysJob()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voiddispose()Releases and destroys used resourcesvoidexecute(JobExecutionContext context)static voidinitialize(ServiceManager serviceManager, Context context)Initialize the static fields.
 
- 
- 
- 
Field Detail- 
KEY_LAST_DURATIONpublic static final String KEY_LAST_DURATION The key for the last duration of theexecute(org.quartz.JobExecutionContext)method which is stored in theJobDataMap- See Also:
- Constant Field Values
 
 - 
KEY_PREVIOUS_FIRE_TIMEpublic static final String KEY_PREVIOUS_FIRE_TIME The key for the previous fire time of this job which is stored in theJobDataMap- See Also:
- Constant Field Values
 
 - 
KEY_SUCCESSpublic static final String KEY_SUCCESS The key for the success state of the last execution of the job- See Also:
- Constant Field Values
 
 - 
_serviceManagerprotected static ServiceManager _serviceManager The service manager
 - 
_schedulableEPprotected static SchedulableExtensionPoint _schedulableEP The extension point forSchedulables
 - 
_schedulerprotected static Scheduler _scheduler The scheduler component
 - 
_environmentContextprotected static Context _environmentContext The cocoon environment context.
 - 
_userManagerprotected static UserManager _userManager The user manager component
 
- 
 - 
Constructor Detail- 
AmetysJobpublic AmetysJob() 
 
- 
 - 
Method Detail- 
initializepublic static void initialize(ServiceManager serviceManager, Context context) throws ServiceException, ContextException Initialize the static fields.- Parameters:
- serviceManager- The service manager
- context- The context
- Throws:
- ServiceException- if an error occurs during the lookup of the- SchedulableExtensionPoint
- ContextException- if environment context object not found
 
 - 
disposepublic static void dispose() Releases and destroys used resources
 - 
executepublic void execute(JobExecutionContext context) throws JobExecutionException - Specified by:
- executein interface- Job
- Throws:
- JobExecutionException
 
 
- 
 
-