|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectme.escapeNT.pail.scheduler.ServerTask
public class ServerTask
Class representing a scheduled server task.
Nested Class Summary | |
---|---|
static class |
ServerTask.Type
The type of server task to execute. |
Constructor Summary | |
---|---|
ServerTask(ServerTask.Type type,
boolean repeating,
long interval,
String name)
Constructs a new Server task of the given type. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServerTask(ServerTask.Type type, boolean repeating, long interval, String name)
type
- The Type of server task.repeating
- True if the task is repeating.interval
- The interval (or delay) between executions.Method Detail |
---|
public long getInterval()
ScheduledTask
getInterval
in interface ScheduledTask
public boolean isRepeating()
ScheduledTask
isRepeating
in interface ScheduledTask
public void execute()
ScheduledTask
execute
in interface ScheduledTask
public boolean isEnabled()
ScheduledTask
isEnabled
in interface ScheduledTask
public void setEnabled(boolean enabled)
ScheduledTask
setEnabled
in interface ScheduledTask
enabled
- True if the task will be enabled, false if disabled.public String getName()
ScheduledTask
getName
in interface ScheduledTask
public void setName(String name)
ScheduledTask
setName
in interface ScheduledTask
name
- the name to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |