|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.adventnet.utils.agent.ThreadScheduler
public class ThreadScheduler
This Class is to schedule the Threads when The Agent is in Asynchronous mode.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
(package private) java.util.Vector |
holders
|
(package private) int |
MAX_THREADS
|
(package private) SnmpPduRequestListener |
pduRequestHandler
|
(package private) java.util.Vector |
ready_events
|
(package private) java.util.Vector |
requestEvents
|
(package private) boolean |
STOP
|
(package private) int |
STOPPED_THREADS
|
(package private) int |
TOTAL_THREADS
|
(package private) java.util.Vector |
waitThreads
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ThreadScheduler(java.lang.String name)
The Constructor for Thread Scheduler with the String name. |
|
| Method Summary | |
|---|---|
boolean |
clearThreads()
This method is for clearing all the Threads in the Scheduler. |
int |
getMaxThreads()
Getter for the Maximum Number of Threads allowed by the Scheduler. |
(package private) SnmpPduRequestEvent |
getNextEvent()
|
SnmpPduRequestEvent |
getTheWork()
This Method is to collectr the Work to be scheduled. |
(package private) void |
putInWaitMode(HolderThread holder)
|
void |
run()
This method is to run- kicking off the Agent. |
(package private) void |
runTask(SnmpPduRequestEvent event)
|
void |
scheduleEvent(SnmpPduRequestEvent event)
Method to schedule the given Event. |
boolean |
setMaxThreads(int m)
Setter for the Maximum Number of Threads The Maximum limit is 20 |
void |
setPduListener(SnmpPduRequestListener l)
Method to set the PduListener for this class. |
(package private) void |
startHolderThreads()
|
boolean |
STOP_THIS()
Method to stop. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int MAX_THREADS
int TOTAL_THREADS
int STOPPED_THREADS
boolean STOP
java.util.Vector requestEvents
java.util.Vector holders
java.util.Vector ready_events
java.util.Vector waitThreads
SnmpPduRequestListener pduRequestHandler
| Constructor Detail |
|---|
public ThreadScheduler(java.lang.String name)
name - The name for the Thread Scheduler.| Method Detail |
|---|
public int getMaxThreads()
public boolean STOP_THIS()
public boolean setMaxThreads(int m)
m - The int specifying the number of Threads
public void setPduListener(SnmpPduRequestListener l)
l - The SnmpPduRequestListener to be set.public void scheduleEvent(SnmpPduRequestEvent event)
event - The SnmpPduRequestEvent to be scheduled.public SnmpPduRequestEvent getTheWork()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadvoid putInWaitMode(HolderThread holder)
void runTask(SnmpPduRequestEvent event)
SnmpPduRequestEvent getNextEvent()
public boolean clearThreads()
void startHolderThreads()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||