com.sssw.fw.task.api
Interface EbiPeriodicTask
- All Superinterfaces:
- EbiElement, EbiTask, Serializable
- public interface EbiPeriodicTask
- extends EbiTask
Interface that defines the behavior for a periodic task. This
kind of task is to be executed every N milliseconds where N is the time
interval associated with the task.
Method Summary |
long |
getInterval()
Gets the value, in milliseconds, of the associated time interval for
this task. |
boolean |
isExact()
Tells whether the task should be registered to run as soon as possible or
some interval after the current time. |
void |
setExact(boolean exact)
Tells whether the task should be registered to run as soon as possible or
some interval after the current time. |
void |
setInterval(long millis)
Sets the interval that is to be associated with this task. |
Methods implemented from interface com.sssw.fw.task.api.EbiTask |
doTask,
enable,
execute,
fromXML,
getContext,
getDescription,
getLaunchTime,
getName,
getSinceLast,
getTaskType,
getTimesRan,
getUserObject,
isEnabled,
isOfType,
isStarted,
setContext,
setDescription,
setLaunchTime,
setName,
setSinceLast,
setTaskType,
setTimesRan,
setUserObject,
start,
stop |
TASK_KIND_PERIODIC
public static final String TASK_KIND_PERIODIC
- The constant for a periodic task.
isExact
public boolean isExact()
- Tells whether the task should be registered to run as soon as possible or
some interval after the current time.
- Returns:
- True if it should be run as soon as possible, false if it should be run some
number of milliseconds after the current time.
getInterval
public long getInterval()
- Gets the value, in milliseconds, of the associated time interval for
this task.
- Returns:
- The interval in milliseconds.
setExact
public void setExact(boolean exact)
- Tells whether the task should be registered to run as soon as possible or
some interval after the current time.
- Parameters:
exact
- If true, run as soon as possible, otherwise some number of
milliseconds after the current time.
setInterval
public void setInterval(long millis)
- Sets the interval that is to be associated with this task.
- Parameters:
millis
- The interval in milliseconds.