|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.adventnet.snmp.snmp2.SnmpCallback
class SnmpCallback
This class starts a thread which monitors if callback has to be called when a response arrives.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SnmpCallback(SnmpSession session)
Constructs an SnmpCallback object using default IP protocol. |
|
| Method Summary | |
|---|---|
(package private) void |
close()
Sets the closeCallback boolean true Wakesup all the waiting Threads |
(package private) void |
enQ(SnmpClient client,
SnmpPDU pdu,
int reqid)
When callback has to be called SnmpSession receiver queues it in the responses vector. |
(package private) void |
enQ(SnmpPDU pdu)
After extracting the reqid the PDU is handed over to this thread method by SnmpSession for further processing. |
void |
run()
The run method of the thread which checks the 'responses' vector and 'packet' vector and calls the appropriate callback. |
| 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 |
| Constructor Detail |
|---|
SnmpCallback(SnmpSession session)
| Method Detail |
|---|
void enQ(SnmpClient client,
SnmpPDU pdu,
int reqid)
client - This is the application which has
registered for handling the PDU.session - The SnmpSession instance invoking
this method.pdu - the SnmpPDU Objectreqid - the request-id of the packetSnmpClientvoid enQ(SnmpPDU pdu)
packet - The packet received.session - handle to the SnmpSession instance invoking
this method.pdu - the SnmpPDU objectSnmpSessionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadvoid close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||