Interface Task

  • All Known Subinterfaces:
    Callback<V>
    All Known Implementing Classes:
    FocessCallback, FocessTask

    public interface Task
    The warped task. You can use this to handle runnable processing
    • Method Detail

      • cancel

        boolean cancel​(boolean mayInterruptIfRunning)
        Cancel this task
        Parameters:
        mayInterruptIfRunning - must be false
        Returns:
        true if it is cancelled, false otherwise
      • cancel

        default boolean cancel()
        Cancel this task
        Returns:
        true if it is cancelled, false otherwise
        See Also:
        cancel(boolean)
      • isRunning

        boolean isRunning()
        Indicate whether this task is running or not
        Returns:
        true if the task is running, false otherwise
      • getPlugin

        Plugin getPlugin()
        Get the plugin it belongs to
        Returns:
        the plugin it belongs to
      • getScheduler

        Scheduler getScheduler()
        Get the scheduler it belongs to
        Returns:
        the scheduler it belongs to
      • getName

        String getName()
        Get the name of the task
        Returns:
        the name of the task
      • isPeriod

        boolean isPeriod()
        Indicate whether this task is a period-task or not
        Returns:
        true if it is a period-task, false otherwise
      • isFinished

        boolean isFinished()
        Indicate whether this task is finished or not
        Returns:
        true if this task is finished, false otherwise
      • isCancelled

        boolean isCancelled()
        Indicate whether this task is cancelled or not
        Returns:
        true if it is cancelled, false otherwise