Hi Pradip, Session.listen() does not block. The rest of you assumptions do not match with SNMP4J either and I am a bit confused about them. Please read RFC 3410 to 3418 to get a better understanding of the SNMP architecture.
Best regards, Frank pradip de wrote: > 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 -- AGENT++ http://www.agentpp.com http://www.snmp4j.com http://www.mibexplorer.com http://www.mibdesigner.com _______________________________________________ SNMP4J mailing list [email protected] http://lists.agentpp.org/mailman/listinfo/snmp4j
