Package com.kraken.api.core.script
Interface Task
-
- All Known Implementing Classes:
AbstractTask,PriorityTask
public interface TaskRepresents a generic task that can be executed as part of a workflow or script logic.This interface provides three primary methods that allow implementers to define:
- Validation logic to determine whether the task should be executed.
- The core execution logic of the task.
- A status string for display or tracking purposes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intexecute()Executes the task logic.java.lang.Stringstatus()Returns the name of the status for display.booleanvalidate()Checks if this task should currently be executed.
-
-
-
Method Detail
-
validate
boolean validate()
Checks if this task should currently be executed.- Returns:
- true if the task is valid, false otherwise.
-
execute
int execute()
Executes the task logic.- Returns:
- The number of milliseconds to sleep after execution.
-
status
java.lang.String status()
Returns the name of the status for display.- Returns:
- Status string.
-
-