Class TaskInfo

java.lang.Object
org.deltava.taskman.TaskInfo
All Implemented Interfaces:
Serializable, Comparable<TaskInfo>

public class TaskInfo extends Object implements Serializable, Comparable<TaskInfo>
A bean to store information about a scheduled task.
Since:
1.0
Version:
7.0
Author:
Luke
See Also:
  • Constructor Details

    • TaskInfo

      public TaskInfo(Task t)
      Initializes the Task Information bean.
      Parameters:
      t - the Task to display information about
  • Method Details

    • getName

      public String getName()
      Returns the Task name.
      Returns:
      the name
    • getID

      public String getID()
      Returns the Task ID.
      Returns:
      the ID
    • getClassName

      public String getClassName()
      Returns the Task's class name.
      Returns:
      the name of the class
    • getRunTimes

      public Map<String, Collection<Integer>> getRunTimes()
      Returns the times this Task is eligible to be run.
      Returns:
      a Map of interval types and values
      See Also:
    • getLastStartTime

      public Instant getLastStartTime()
      Returns the Task's last execution date.
      Returns:
      the date/time the Task was last run, or null if never
      See Also:
    • getLastRunTime

      public long getLastRunTime()
      Returns the duration of the Task's last execution.
      Returns:
      the execution time in milliseconds
      See Also:
    • getEnabled

      public boolean getEnabled()
      Returns if the Task is enabled for execution.
      Returns:
      TRUE if the Task is enabled, otherwise FALSE
    • getRunCount

      public int getRunCount()
      Returns the number of times the Task has been executed.
      Returns:
      the execution count
    • compareTo

      public int compareTo(TaskInfo ti2)
      Compares two TaskInfo beans by comparing their next execution times and IDs.
      Specified by:
      compareTo in interface Comparable<TaskInfo>