Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.examplev2c
Class discover

    java.lang.Object
      |
      +--uk.co.westhawk.examplev2c.discover

All Implemented Interfaces:
  java.util.Observer

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.

Since:
  4_14
Version:
  $Revision: 1.3 $ $Date: 2006/01/30 11:37:15 $
Author:
  Birgit Arkesteijn
See Also:
  `MultiResponsePdu`, `Util`

Field Summary
`static java.lang.String` | `sysUpTime`

Constructor Summary
`discover(java.lang.String propertiesFilename)` Constructor.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sysUpTime

    public static final java.lang.String sysUpTime

See Also:
  Constant Field Values

Constructor Detail

### discover

    public discover(java.lang.String propertiesFilename)

  Constructor.

Parameters:
  `propertiesFilename` - The name of the properties file. Can be null.

Method Detail

### init

    public void init()

### createContext

    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`

### update

    public void update(java.util.Observable obs,
                       java.lang.Object ov)

  Implementing the Observer interface. Receiving the response from the Pdu.

  Specified by:
    `update` in interface `java.util.Observer`
  Parameters:
    `obs` - the MultiResponsePdu variable
    `ov` - the agent that replied
  See Also:
    `MultiResponsePdu`, `varbind`

### main

    public static void main(java.lang.String[] args)

  Main. To use a properties file different from `discover.properties`, pass the name as first argument.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD