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
Modifier and TypeInterfaceDescriptionstatic enum
The possible ways to fire the runnablestatic enum
The 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 ofSchedulable
to executeGets the user which should be used to launch the runnable task.boolean
Determines if this runnable can be activate or deactivateboolean
Determines if this runnable can be modifiedboolean
Determines if this runnable can be removedboolean
Determines 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 ofSchedulable
to execute- Returns:
- the identifier of
Schedulable
-
isRemovable
boolean isRemovable()Determines if this runnable can be removed- Returns:
true
if this runnable is removable
-
isModifiable
boolean isModifiable()Determines if this runnable can be modified- Returns:
true
if this runnable is modifiable
-
isDeactivatable
boolean isDeactivatable()Determines if this runnable can be activate or deactivate- Returns:
true
if 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
UserIdentity
of the user
-