[SNMP4J] SNMP Dispatcher

Scott MacKay scottmackay at yahoo.com
Tue Sep 19 23:06:59 CEST 2006


Not sure I follow exactly, but that is me.
If the PDU is set (it will never change once set, only
used by 1 object and referenced by the 1 thread which
issues the send) and the frequency of the send is
larger than the timeout, do I need to worry about
that?
If I do, can I just do a setRequestID to 0?


-Scott

--- Frank Fock <fock at agentpp.com> wrote:

> Hi Scott,
> 
> Amost everything is OK, except you will need
> to clone the PDU you are sending before each
> call to snmp.send(..) because otherwise, you
> will use the same request ID for all the requests
> and SNMP4J will then not be able to map the
> responses to the right request.
> 
> Best regards,
> Frank
> 
> Scott MacKay wrote:
> > Hi, I am making a SNMP poller and wanted to make
> sure
> > I was doing it right...
> > 
> > With a class SNMPEntity, implementing
> > ResponseListener, each having a PDU and Target. 
> The
> > idea is that the class's object will get back the
> > results for its own PDU/Target.
> > 
> > I have a dispatching thread, with:
> > Transport transport=new
> DefaultUdpTransportMapping();
> > Snmp snmp=new Snmp(transport);
> > snmp.listen();
> > 
> > In a loop of an array of SNMPEntity, I want to
> issue a
> > SNMP to the it's target.
> >    I basically do a:
> > for (int i=0;i<SNMPEntityArray.size();i++) {
> >   SNMPEntity entity=SNMPEntityArray.get(i);
> >   snmp.send(pdu, entity.getTarget(), null,
> entity);
> > }
> > 
> > Is there any more setup/preparation needed?
> > Will this cause problems/overwrites/etc when
> sending a
> > number of requests back to back?
> > 
> > -Scott
> > 
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > _______________________________________________
> > SNMP4J mailing list
> > SNMP4J at agentpp.org
> > http://lists.agentpp.org/mailman/listinfo/snmp4j
> 
> -- 
> AGENT++
> http://www.agentpp.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the SNMP4J mailing list