|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.protocols.snmp.SnmpTimer
Provides a simple timer scheduler for use by the internal SnmpSession class. Resolution is provided at the millisecond level.
SnmpSession| Nested Class Summary | |
private class |
SnmpTimer.Scheduler
This object is the thread of execution that monitors and executes the scheduled runnables. |
private class |
SnmpTimer.TimeoutElement
Used to track the individual runnables and when the runnable "expires". |
| Field Summary | |
private boolean |
m_exit
when true the internal thread should exit |
private java.util.LinkedList |
m_list
The list of runnable objects (stored as TimeoutElement) |
private java.lang.Object |
m_sync
The synchronization object |
private java.lang.Thread |
m_thread
The thread doing the scheduling |
| Constructor Summary | |
(package private) |
SnmpTimer()
Creates an SnmpTime object and it's internal thread that is used to schedual the execution of the runnables. |
| Method Summary | |
(package private) void |
cancel()
Cancels the current timer object and terminates the internal thread |
(package private) void |
schedule(java.lang.Runnable runner,
long milliseconds)
Schedules the runnable to be run after AT LEAST ms milliseconds of time has expired. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.LinkedList m_list
private java.lang.Thread m_thread
private boolean m_exit
private java.lang.Object m_sync
| Constructor Detail |
SnmpTimer()
| Method Detail |
void schedule(java.lang.Runnable runner,
long milliseconds)
runner - The runnable objectmilliseconds - The number of milliseconds to waitvoid cancel()
|
OpenNMS API 1.1.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||