001 package org.bukkit.scheduler;
002
003 import org.bukkit.plugin.Plugin;
004
005 /**
006 * Represents a worker thread for the scheduler. This gives information about
007 * the Thread object for the task, owner of the task and the taskId.
008 * <p>
009 * Workers are used to execute async tasks.
010 */
011 public interface BukkitWorker {
012
013 /**
014 * Returns the taskId for the task being executed by this worker.
015 *
016 * @return Task id number
017 */
018 public int getTaskId();
019
020 /**
021 * Returns the Plugin that owns this task.
022 *
023 * @return The Plugin that owns the task
024 */
025 public Plugin getOwner();
026
027 /**
028 * Returns the thread for the worker.
029 *
030 * @return The Thread object for the worker
031 */
032 public Thread getThread();
033
034 }