me.escapeNT.pail.scheduler
Class BackupTask

java.lang.Object
  extended by me.escapeNT.pail.scheduler.BackupTask
All Implemented Interfaces:
Serializable, ScheduledTask

public class BackupTask
extends Object
implements ScheduledTask

Class representing a scheduled world backup task.

Author:
escapeNT
See Also:
Serialized Form

Constructor Summary
BackupTask(org.bukkit.World world, boolean broadcastMessage, boolean repeating, long interval, String name)
          Constructs a new scheduled world backup.
 
Method Summary
 void execute()
          Executes this backup 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackupTask

public BackupTask(org.bukkit.World world,
                  boolean broadcastMessage,
                  boolean repeating,
                  long interval,
                  String name)
Constructs a new scheduled world backup.

Parameters:
world - The world to back up.
broadcastMessage - True if a message will be broadcast in the world during the backup.
repeating - True if this task will repeat.
interval - The interval between executions (or delay for a non-repeating task).
Method Detail

getInterval

public long getInterval()
Description copied from interface: ScheduledTask
Gets the time interval between executions of this task.

Specified by:
getInterval in interface ScheduledTask
Returns:
The interval in milliseconds between task executions.

isRepeating

public boolean isRepeating()
Description copied from interface: ScheduledTask
Returns true if the task should be repeated indefinitely.

Specified by:
isRepeating in interface ScheduledTask
Returns:
True if the task is repeating, false if not.

execute

public void execute()
Executes this backup task.

Specified by:
execute in interface ScheduledTask

isEnabled

public boolean isEnabled()
Description copied from interface: ScheduledTask
Gets whether the task is enabled and running.

Specified by:
isEnabled in interface ScheduledTask
Returns:
True if the task is enabled.

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: ScheduledTask
Sets whether the task is enabled and running.

Specified by:
setEnabled in interface ScheduledTask
Parameters:
enabled - True if the task will be enabled, false if disabled.

getName

public String getName()
Description copied from interface: ScheduledTask
Gets the name of the specific task.

Specified by:
getName in interface ScheduledTask
Returns:
the name

setName

public void setName(String name)
Description copied from interface: ScheduledTask
Sets the task name.

Specified by:
setName in interface ScheduledTask
Parameters:
name - the name to set


Copyright © 2011. All Rights Reserved.