|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.snmp4j.util.TaskScheduler
public class TaskScheduler
The TaskScheduler
uses a ThreadPool
to recurrent
execute SchedulerTask
s.
Field Summary | |
---|---|
protected long |
schedulerTimeout
|
Constructor Summary | |
---|---|
TaskScheduler(ThreadPool threadPool)
Creates a TaskScheduler that uses the supplied
ThreadPool to execute tasks. |
Method Summary | |
---|---|
void |
addTask(SchedulerTask task)
Adds a task to the scheduler. |
void |
clear()
Removes all tasks. |
boolean |
isStop()
Checks if the scheduler is (to be) stopped. |
boolean |
removeTask(SchedulerTask task)
Removes a task from the scheduler. |
void |
run()
Runs the scheduler. |
void |
setStop(boolean stop)
Stops the schedulers run method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long schedulerTimeout
Constructor Detail |
---|
public TaskScheduler(ThreadPool threadPool)
TaskScheduler
that uses the supplied
ThreadPool
to execute tasks.
threadPool
- a ThreadPool
.Method Detail |
---|
public void addTask(SchedulerTask task)
task
- a SchedulerTask
.public boolean removeTask(SchedulerTask task)
task
- the SchedulerTask
to be removed from the scheduler
true
if the task could be removed.public void clear()
public void run()
run
in interface java.lang.Runnable
public void setStop(boolean stop)
stop
- true
to stop the scheduler.public boolean isStop()
true
if the scheduler has been stopped or is being stopped.
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |