org.netsnmp.util
Class snmpgetRunner
java.lang.Object
|
+--org.netsnmp.util.snmpgetRunner
- public class snmpgetRunner
- extends Object
This class runs 'snmpget' in a separate process and extracts its result.
THIS IS NOT the means by which the netsnmpj library acquires data.
This is a utility class used in testing to confirm results acquired by
the library.
- Author:
- Andrew E. Page aepage@users.sourceforge.net
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
snmpgetRunner
public snmpgetRunner(String hostname,
String v2Community)
- Creates a new instance of snmpgetRunner
main
public static void main(String[] args)
addOption
public void addOption(String opt)
addOptions
public void addOptions(String[] opts)
getString
public String getString(OID oid)
throws Exception
Exception
getStringOrAbort
public String getStringOrAbort(OID oid)
getOID
public OID getOID(OID oid)
throws Exception
Exception
getOIDOrAbort
public OID getOIDOrAbort(OID oid)
getInt
public int getInt(OID oid)
throws Exception
Exception
getIntOrAbort
public int getIntOrAbort(OID oid)