Package org.ametys.core.schedule
Interface Runnable
- All Known Implementing Classes:
AbstractConfigBasedHourRunnable,AbstractPublishOrUnpublishPageRunnable,CleanJCaptchaRunnable,ConfigBasedDailyRunnable,ConfigBasedEveryNMinutesRunnable,ConfigBasedRunnable,ConfigBasedWeeklyRunnable,DefaultRunnable,ExecuteExtractionRunnable,ImportArchiveRunnable,InvalidateFOCacheRunnable,PublishPageRunnable,ReloadSolrAclCachesForCoresRunnable,SendInvitationsRunnable,SendNotificationSummaryRunnable,StaticRunnable,UnlockRunnable,UnpublishPageRunnable
public interface Runnable
This interface represents the entity by which a
Schedulable can be scheduled.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe possible ways to fire the runnablestatic enumThe possible misfire policies -
Method Summary
Modifier and TypeMethodDescriptionReturns the cron expression to base the schedule on.Returns the descriptionGets the process of firing, i.e.getId()Returns the idgetLabel()Returns the labelGets the misfire policy, i.e.Gets the values of the parameters (from the linkedSchedulable)Gets the identifier ofSchedulableto executeGets the user which should be used to launch the runnable task.booleanDetermines if this runnable can be activate or deactivatebooleanDetermines if this runnable can be modifiedbooleanDetermines if this runnable can be removedbooleanDetermines if the runnable must not survive to a server restart
-
Method Details
-
getId
Returns the id- Returns:
- the id
-
getLabel
Returns the label- Returns:
- the i18n label
-
getDescription
Returns the description- Returns:
- the i18n description
-
getFireProcess
Gets the process of firing, i.e. the way the task will be scheduled (fire now, fire at next stratup, schedule it based on a cron expression...).- Returns:
- the fire process
-
getCronExpression
Returns the cron expression to base the schedule on. Ignored ifgetFireProcess()is different fromRunnable.FireProcess.CRON.- Returns:
- the cron expression
-
getSchedulableId
Gets the identifier ofSchedulableto execute- Returns:
- the identifier of
Schedulable
-
isRemovable
boolean isRemovable()Determines if this runnable can be removed- Returns:
trueif this runnable is removable
-
isModifiable
boolean isModifiable()Determines if this runnable can be modified- Returns:
trueif this runnable is modifiable
-
isDeactivatable
boolean isDeactivatable()Determines if this runnable can be activate or deactivate- Returns:
trueif this runnable is deactivatable
-
getMisfirePolicy
Gets the misfire policy, i.e. what the runnable must do if it missed a trigger. Ignored ifgetFireProcess()is different fromRunnable.FireProcess.CRON.- Returns:
- The misfire policy
-
isVolatile
boolean isVolatile()Determines if the runnable must not survive to a server restart- Returns:
- true if the runnable must not survive to a server restart
-
getParameterValues
Gets the values of the parameters (from the linkedSchedulable)- Returns:
- the parameter values
-
getUserIdentity
Gets the user which should be used to launch the runnable task.- Returns:
- the
UserIdentityof the user
-