[SNMP4J] Difference between addNotificationListener() and addCommandResponder

Frank Fock fock at agentpp.com
Tue Oct 10 00:55:39 CEST 2006


Hi Adam,

When you want to listen to notifications, traps, and informs
then you should use the addNotificationListener method.
The addCommandResponder method could be used too for that
task - although it is not recommended, because the first
is better specialized for that task.

Does that answer your question?

Best regards,
Frank

Adam Brons wrote:
> 
> Hey Guys/Gals,
> 
> I'm in the process of writing a SNMP listener for trap messages.  The
> examples included in the API documentation and the
> org.snmp4j.tools.console.SnmpRequest use "addCommandResponder(..)" which is
> what I'd planned to use until I was examing the API doc on org.snmp4j.Snmp
> and noticed "addNotificationListener(...)".  I've google searched the list
> archives for any distinction between the two methods.  I've gathered that
> addNotificationListerner allows you to bind to a local interface and port,
> transport mapping, and specify a CommandResponder to deal with TRAP
> messages and that addCommandResponder is used for two-way communication
> where the received SNMP message is expecting a return message.
> 
> I apologize in advance if this has been answered and I haven't found it.  I
> personally hate the default archiving with Mailman when it comes to
> searching the archives.
> 
> Thanks in advance.
> 
> Adam Brons
> TSOM Software Engineer
> IBM Tivoli Software_______________________________________________
> 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




More information about the SNMP4J mailing list