Class RunnableTask

java.lang.Object
org.omegazero.common.event.task.AbstractTask
org.omegazero.common.event.task.RunnableTask
All Implemented Interfaces:
Comparable<Task>, Runnable, Task

public class RunnableTask extends AbstractTask
A Task based on a Runnable.
Since:
2.9
  • Constructor Details

    • RunnableTask

      public RunnableTask(Runnable handler)
      Creates a new RunnableTask.
      Parameters:
      handler - The task handler
    • RunnableTask

      public RunnableTask(Runnable handler, int priority)
      Creates a new RunnableTask.
      Parameters:
      handler - The task handler
      priority - The priority of this task
  • Method Details

    • execute

      protected void execute(Object[] args) throws Exception
      Description copied from class: AbstractTask
      Executes this task with the given arguments.
      Specified by:
      execute in class AbstractTask
      Parameters:
      args - The arguments to pass to the task handler
      Throws:
      Exception - If an error occurs