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.snmp.beans
Class UsmDiscoveryBean

    java.lang.Object
      |
      +--uk.co.westhawk.snmp.beans.UsmDiscoveryBean

public class UsmDiscoveryBean
extends java.lang.Object

This bean performs the SNMPv3 USM discovery process.

The process consists of two steps: first the SNMP engine ID has to be discovered, second the timeline details of the SNMP engine ID have to be discovered. For the last step the username of the principal is needed.

See SNMP-USER-BASED-SM-MIB.

Version:
  $Revision: 1.17 $ $Date: 2006/06/19 10:48:15 $
Author:
  Birgit Arkesteijn

Constructor Summary
`UsmDiscoveryBean(java.lang.String host, int port)` Constructor.
`UsmDiscoveryBean(java.lang.String host, int port, java.lang.String bindAddr, java.lang.String typeSocketA)` Constructor.

Method Summary
`protected void` | `discoveryEngineId()` Starts the discovery of the SNMP engine ID.
`protected void` | `discoveryTimeLine()` Starts the discovery of the Time line.
`void` | `freeResources()` Destroy the context in use.
`void` | `setAuthenticationDetails(java.lang.String newUserName, java.lang.String newUserPassword, int protocol)` Sets the user's authentication details.
`void` | `setPrivacyDetails(java.lang.String newUserPassword)` Sets the user's privacy details.
`void` | `startDiscovery()` Starts the discovery.

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

Constructor Detail

### UsmDiscoveryBean

    public UsmDiscoveryBean(java.lang.String host,
                            int port)
                     throws java.io.IOException

  Constructor.

Parameters:
  `host` - The host to discover
  `port` - The port to discover
See Also:
  `SnmpContextv3.SnmpContextv3(String, int)`, `startDiscovery()`

### UsmDiscoveryBean

    public UsmDiscoveryBean(java.lang.String host,
                            int port,
                            java.lang.String bindAddr,
                            java.lang.String typeSocketA)
                     throws java.io.IOException

  Constructor.

Parameters:
  `host` - The host to discover
  `port` - The port to discover
  `typeSocketA` - The type of socket to use.
See Also:
  `SnmpContextv3.SnmpContextv3(String, int, String, String)`, `startDiscovery()`

Method Detail

### setAuthenticationDetails

    public void setAuthenticationDetails(java.lang.String newUserName,
                                         java.lang.String newUserPassword,
                                         int protocol)

  Sets the user's authentication details. With these details the time line details will be retrieved. If the user details are not set, only the engine ID will be discovered.

  The time line details only need to be known when the user want to send authenticated message to this SNMP engine.

  Parameters:
    `newUserName` - The user name
    `newUserPassword` - The user authentication password
    `protocol` - The user authentication protocol
  See Also:
    `SnmpContextv3Basis.setUserName(String)`, `SnmpContextv3Basis.setUserAuthenticationPassword(String)`, `SnmpContextv3Basis.setAuthenticationProtocol(int)`

### setPrivacyDetails

    public void setPrivacyDetails(java.lang.String newUserPassword)

  Sets the user's privacy details. With these details the time line details will be retrieved if needed.

  The time line details only need to be known when the user want to send authenticated message to this SNMP engine.

  Parameters:
    `newUserPassword` - The user privacy password
  See Also:
    `SnmpContextv3Basis.setUserPrivacyPassword(String)`

### startDiscovery

    public void startDiscovery()
                        throws PduException,
                               java.io.IOException

  Starts the discovery. This method will send a Pdu to discover the SNMP engine ID. Set the user details before calling this method, if you want the time line details to be discovered as well.

  This is a blocking call! It will return when it has done the whole discovery.

    `PduException`
    `java.io.IOException`
  See Also:
    `setAuthenticationDetails(String, String, int)`, `discoveryEngineId()`, `discoveryTimeLine()`

### freeResources

    public void freeResources()

  Destroy the context in use.

### discoveryEngineId

    protected void discoveryEngineId()
                              throws PduException,
                                     java.io.IOException

  Starts the discovery of the SNMP engine ID.

  This is a blocking call! It will return when it has done the whole discovery.

    `PduException`
    `java.io.IOException`
  See Also:
    `startDiscovery()`, `discoveryTimeLine()`

### discoveryTimeLine

    protected void discoveryTimeLine()
                              throws PduException,
                                     java.io.IOException

  Starts the discovery of the Time line.

  This is a blocking call! It will return when it has done the whole discovery.

    `PduException`
    `java.io.IOException`
  See Also:
    `startDiscovery()`, `discoveryEngineId()`

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