[SNMP4J] aync send thread?

Scott MacKay scottmackay at yahoo.com
Sun Sep 24 22:42:10 CEST 2006


Cool, good to know.  With that in mind, I wanted to
check on a particular setup.  It does not say it
cannot be done in the javadoc, just wanted
verification.

i have a class with variables for a PDU, a Target, and
implementation of ReponseListener, along with a
variable to store an OID value,

I have an array of this class, each set up with its
own PDU and target.
In a loop, I want to async send the requests.  They
all are v2 and I have 1 Snmp object in the thread
which will handle the dispatching.

Can I loop thru and send each class's PDU, target, and
object as the ResponseListener with a single Snmp
object?

I recall in a previous email something about needing
to clone involving request id.  If I loop on the sends
every 30 seconds, allowing a timeout of 3 seconds, is
resetting/cloning of the requestid required?  Each
time thru the loop, can I just reset the id to 0?

Thanks in advance!

-Scott


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

> Hi Scott,
> 
> In SNMP4J there is no thread creation per SNMP
> request.
> Instead each transport mapping has its own thread
> and
> each Snmp instance has its own thread.
> 
> Best regards,
> Frank
> 
> Scott MacKay wrote:
> > Out of curiosity, when you perform a snmp send
> request
> > asynchronously with a listener, does it generate a
> > thread to perform the call?
> > 
> > If so, can someone detail how you use ThreadPools
> to
> > limit the total number of snmp calls that can be
> > simultaneously running?
> > 
> > Thanks!
> > 
> > -Scott

__________________________________________________
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