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
Modifier and TypeFieldDescriptionprotected static Context
The cocoon environment context.protected static SchedulableExtensionPoint
The extension point forSchedulable
sprotected static Scheduler
The scheduler componentprotected static ServiceManager
The service managerprotected static UserManager
The user manager componentstatic final String
The key for the last duration of theexecute(org.quartz.JobExecutionContext)
method which is stored in theJobDataMap
static final String
The key for the previous fire time of this job which is stored in theJobDataMap
static final String
The key for the success state of the last execution of the job -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
dispose()
Releases and destroys used resourcesvoid
execute
(JobExecutionContext context) static void
initialize
(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 forSchedulable
s -
_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 theSchedulableExtensionPoint
ContextException
- if environment context object not found
-
dispose
Releases and destroys used resources -
execute
- Specified by:
execute
in interfaceJob
- Throws:
JobExecutionException
-