[SNMP4J] Listening for SNMP events

Jason Ruthkoski jtruth33 at yahoo.com
Thu Sep 29 18:53:16 CEST 2005


I'm trying to set up a simple Java program that let's
me listen and receive SNMP events from my machine (I'm
running windows XP).

I ran acroos this under the listen function for the
DefaultUdpTransportMapping class:
 
"Starts the listener thread that accepts incoming
messages. The thread is started in daemon mode and
thus it will not block application terminated."

If this is the case, how can I get my application to
not terminate so it can sit and listen for events?

Also, to set up the app to just listen for events,
which method is correct to set up the connection (I've
run across both in the documentation)?:

Address targetAddress =
GenericAddress.parse("udp:127.0.0.1/161");
TransportMapping Transport = new
DefaultUdpTransportMapping();


or...

TransportMapping Transport = new
DefaultUdpTransportMapping(new
UdpAddress("127.0.0.1/160");


Thank you,

Jason Ruthkoski
jtruth33 at yahoo.com


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



More information about the SNMP4J mailing list