[SNMP4J] (small) feature request

Matthias Wiesmann matthias.wiesmann at gmail.com
Tue Oct 18 07:51:41 CEST 2005


Hello everybody,

I'm currently cleaning up the code of my agent, and realised that some
of code to initialise OID constants is quite ugly.

    public final static OID group_oid = new OID("1.3.6.1.2.1.25.4");
    public final static OID table_oid = new OID(group_oid.toString()+".2.1") ;
    public final static OID os_index_oid = new
OID(group_oid.toString()+".1.0");

Would it possible to have a constructor that takes two arguments, one
the original OID and the other some string to be contatenated to it.

e.g. be able to write:

    public final static OID group_oid = new OID("1.3.6.1.2.1.25.4");
    public final static OID table_oid = new OID(group_oid,".2.1") ;
    public final static OID os_index_oid = new OID(group_oid,".1.0");

Best regards

Matthias Wiesmann



More information about the SNMP4J mailing list