Package org.silverpeas.core.datereminder
Class DateReminderScheduler
- java.lang.Object
-
- org.silverpeas.core.datereminder.DateReminderScheduler
-
- All Implemented Interfaces:
Initialization
,SchedulerEventListener
@Service public class DateReminderScheduler extends Object implements SchedulerEventListener, Initialization
Scheduler for processingDateReminderProcess
instances.- Author:
- Cécile Bonin
- See Also:
DateReminderProcess
,DateReminderProcessRegistration
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATEREMINDER_JOB_NAME_PROCESS
-
Constructor Summary
Constructors Constructor Description DateReminderScheduler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doScheduledDateReminder()
Schedule the date reminder processvoid
init()
Initializes some resources required by the services or performs some initialization processes at Silverpeas startup.void
jobFailed(SchedulerEvent anEvent)
Invoked when the normal execution thread of a job is broken by an exception.void
jobSucceeded(SchedulerEvent anEvent)
Invoked when the execution of a job has been completed correctly.void
triggerFired(SchedulerEvent anEvent)
Invoked when a job trigger fires the execution of a job.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.initialization.Initialization
getPriority, release
-
-
-
-
Field Detail
-
DATEREMINDER_JOB_NAME_PROCESS
public static final String DATEREMINDER_JOB_NAME_PROCESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init()
Description copied from interface:Initialization
Initializes some resources required by the services or performs some initialization processes at Silverpeas startup.- Specified by:
init
in interfaceInitialization
-
doScheduledDateReminder
public void doScheduledDateReminder() throws DateReminderException
Schedule the date reminder process- Throws:
DateReminderException
-
triggerFired
public void triggerFired(SchedulerEvent anEvent) throws org.silverpeas.kernel.SilverpeasException
Description copied from interface:SchedulerEventListener
Invoked when a job trigger fires the execution of a job. The call of this method occurs before the actual job execution. So, whether an error occurs during the processing of this call, it is considered as a job failure and as consequence an event about a job failure will be sent to the listener. The processing of this event can be, for example for preparing the resources before the job execution or performing the execution of the job itself (delegation).- Specified by:
triggerFired
in interfaceSchedulerEventListener
- Parameters:
anEvent
- the event coming from the trigger firing.- Throws:
org.silverpeas.kernel.SilverpeasException
- if the process of this event failed.
-
jobSucceeded
public void jobSucceeded(SchedulerEvent anEvent)
Description copied from interface:SchedulerEventListener
Invoked when the execution of a job has been completed correctly. The job execution is considered as completed when it ends without raising any exceptions. The processing of this call can be, for example, for freeing the resources after a job completion.- Specified by:
jobSucceeded
in interfaceSchedulerEventListener
- Parameters:
anEvent
- the event coming from the job completion.
-
jobFailed
public void jobFailed(SchedulerEvent anEvent)
Description copied from interface:SchedulerEventListener
Invoked when the normal execution thread of a job is broken by an exception. When an exception is thrown by the job execution, the exception is catched by the scheduler that then considers the job has failed and thus send an event about that failure. The processing of this event can be, for example, for freeing correctly the resources after a job failure or to run a rollback or a retry process.- Specified by:
jobFailed
in interfaceSchedulerEventListener
- Parameters:
anEvent
- the event coming from the job failure.
-
-