Hi, I am trying to understand the threading structure of TestAgent.java for my own implementation of an SNMP agent. My question is basically regarding the busy wait that is there with a periodic Thread.sleep(). Why doesnt the BaseAgent have a while(true) loop around the session.listen() ( which I believe is a blocking function on incoming requests ) instead of the busy wait in TestAgent? Or am I missing something here? There must be a listening mechanims in a loop somewhere that allows the agent to respond to multiple SNMP requests. As an associated question, I am trying to have my TestAgent implement a listener to a messagequeue to send traps out. However, it maybe getting blocked by the busy wait in the main thread. I would really appreciate if someone could clarify these points for me and give me suggestions on how to make the agent also be a subscriber to some published queueing mechanism to pick up messages for sending traps out.
thanks, Pradip _______________________________________________ SNMP4J mailing list [email protected] http://lists.agentpp.org/mailman/listinfo/snmp4j
