Class SnmpGet
java.lang.Object
|
+----SnmpGet
- public class SnmpGet
- extends Object
- implements Observer
This class performs a SNMP GET operation.
This class uses the Westhawk 3.x SNMP package to implement a simple
SNMP GET operation. The Westhawk SNMP package is available at:
www.westhawk.co.uk
- Version:
- $Revision: 1.8 $, $Date: 2000/10/31 20:32:03 $
- Author:
- Joseph Thomas
-
context
- The SNMP context used to access the node which owns this instance
-
dc
- The parent DataCollector for this call
-
value
- The value of this object as returned by a SNMP GET
-
SnmpGet(SnmpContext, String, String, DataCollector)
- Constructor.
-
getVal()
- Return the value of this ObjectID to the caller.
-
update(Observable, Object)
- This method is called via notify() by the underlying SNMP code
when a response is received.
value
private varbind value
- The value of this object as returned by a SNMP GET
context
private SnmpContext context
- The SNMP context used to access the node which owns this instance
dc
private DataCollector dc
- The parent DataCollector for this call
SnmpGet
public SnmpGet(SnmpContext context,
String comm,
String var,
DataCollector dc)
- Constructor.
- Parameters:
- context - The SNMP context for this GET
- comm - The SNMP community name to use when sending this GET
- var - The SNMP ObjectID to GET
getVal
public Object getVal()
- Return the value of this ObjectID to the caller.
update
public void update(Observable ovs,
Object obj)
- This method is called via notify() by the underlying SNMP code
when a response is received.
Store the answer in the form of a Varbind in the local variable
'value'.