public class PeriodicTaskPoller extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
static int |
POLL_INTERVAL_SECONDS |
Modifier and Type | Method and Description |
---|---|
boolean |
addTask(PeriodicTask t)
Adds a task to be run at the specified interval of 15 seconds.
|
static PeriodicTaskPoller |
getInstance()
Gets the single instance of the poller.
|
boolean |
removeTask(PeriodicTask t)
Remove a task.
|
void |
run()
This method is public because it implements runnable.
|
public static PeriodicTaskPoller getInstance()
public boolean addTask(PeriodicTask t)
t
- Taskpublic boolean removeTask(PeriodicTask t)
t
- Task to be removedCopyright © 2013- Suresh Mahalingam. All Rights Reserved.