public class discover
extends java.lang.Object
implements java.util.Observer
The host, port, oid and community name can be configured in the properties file.
MultiResponsePdu
,
Util
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
sysUpTime |
Constructor and Description |
---|
discover(java.lang.String propertiesFilename)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected SnmpContextv2c |
createContext(java.lang.String host,
int port,
java.lang.String socketType,
java.lang.String bindAddr,
java.lang.String community) |
void |
init() |
static void |
main(java.lang.String[] args)
Main.
|
void |
update(java.util.Observable obs,
java.lang.Object ov)
Implementing the Observer interface.
|
public static final java.lang.String sysUpTime
public discover(java.lang.String propertiesFilename)
propertiesFilename
- The name of the properties file. Can be
null.public void init()
protected SnmpContextv2c createContext(java.lang.String host, int port, java.lang.String socketType, java.lang.String bindAddr, java.lang.String community) throws java.io.IOException
java.io.IOException
public void update(java.util.Observable obs, java.lang.Object ov)
update
in interface java.util.Observer
obs
- the MultiResponsePdu variableov
- the agent that repliedMultiResponsePdu
,
varbind
public static void main(java.lang.String[] args)
discover.properties
, pass the name as first argument.