me.escapeNT.pail.scheduler
Interface ScheduledTask

All Superinterfaces:
Serializable
All Known Implementing Classes:
BackupTask, ConsoleCommandTask, ServerTask

public interface ScheduledTask
extends Serializable

Interface containing the basic methods of a schedulable task.

Author:
escapeNT

Method Summary
 void execute()
          Executes this task.
 long getInterval()
          Gets the time interval between executions of this task.
 String getName()
          Gets the name of the specific task.
 boolean isEnabled()
          Gets whether the task is enabled and running.
 boolean isRepeating()
          Returns true if the task should be repeated indefinitely.
 void setEnabled(boolean enabled)
          Sets whether the task is enabled and running.
 void setName(String name)
          Sets the task name.
 

Method Detail

getInterval

long getInterval()
Gets the time interval between executions of this task.

Returns:
The interval in milliseconds between task executions.

isRepeating

boolean isRepeating()
Returns true if the task should be repeated indefinitely.

Returns:
True if the task is repeating, false if not.

isEnabled

boolean isEnabled()
Gets whether the task is enabled and running.

Returns:
True if the task is enabled.

setEnabled

void setEnabled(boolean enabled)
Sets whether the task is enabled and running.

Parameters:
enabled - True if the task will be enabled, false if disabled.

getName

String getName()
Gets the name of the specific task.

Returns:
The task name.

setName

void setName(String name)
Sets the task name.

Parameters:
name - The name of the task.

execute

void execute()
Executes this task.



Copyright © 2011. All Rights Reserved.