[SNMP4J] How to use PDUFactory

raghu ram raghuramonlinehere at rediffmail.com
Fri Aug 25 08:03:25 CEST 2006


hi all,I am trying to create rows in table and using org.snmp4j.util package which hasTableUtils class, TableUtils constructor expects an instance of PDUFactory interface. So, implemented PDUFactory interface as import org.snmp4j.util.PDUFactory;import org.snmp4j.PDU;public class XPlodePDUFactory implements PDUFactory{    public PDU createPDU(Target target)    {        return new PDU();    } }As createPDU(Target) interface has no overloaded method and this requires us to implement two PDUFacotories, one which returns new PDU() and one which returns ScopedPDU() instances. And this doesnot seem to be clean way of implementing. Either I could be missing something or PDUFactory interface requires improvement.Please provide your thoughts on this.- Regards,Raghuram  Nallan





More information about the SNMP4J mailing list