|
SNMP Stack 5_1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uk.co.westhawk.examplev1.getAllInterfaces
The getAllInterfaces application requests the interface information of all the current interfaces of a host, using the InterfaceGetNextPdu.
It walks the tree by creating a new InterfaceGetNextPdu out off the previous one, and it collects the values of all the interfaces. Since the application is Runnable, it will send requests continuously.
The information will be printed to System.out .
The host, port, oid and community name can be configured in the
properties file.
The name of the properties file can be passed as first argument to
this application. If there is no such argument, it will look for
getAllInterfaces.properties. If this file does not exist, the
application will use default parameters.
InterfaceGetNextPdu| Field Summary | |
static long |
sleepTime
Use 10 (sec) as interval |
| Constructor Summary | |
getAllInterfaces(java.lang.String propertiesFilename)
Constructor. |
|
| Method Summary | |
void |
init()
|
static void |
main(java.lang.String[] args)
Main. |
void |
run()
|
void |
start()
|
void |
update(java.util.Observable obs,
java.lang.Object ov)
Implementing the Observer interface. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final long sleepTime
| Constructor Detail |
public getAllInterfaces(java.lang.String propertiesFilename)
propertiesFilename - The name of the properties file. Can be
null.| Method Detail |
public void init()
public void start()
public void run()
run in interface java.lang.Runnable
public void update(java.util.Observable obs,
java.lang.Object ov)
update in interface java.util.Observerobs - the InterfaceGetNextPdu variableov - the array of varbind (not used)InterfaceGetNextPdu,
varbindpublic static void main(java.lang.String[] args)
getAllInterfaces.properties, pass the name as first argument.
|
SNMP Stack 5_1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||