Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 4_12
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | 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 RFC 2574.

Version:
  $Revision: 1.11 $ $Date: 2002/10/22 16:34:23 $
Author:
  Birgit Arkesteijn

Constructor Summary
`UsmDiscoveryBean(java.lang.String host, int port)` Constructor.
`UsmDiscoveryBean(java.lang.String host, int port, 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` | `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:
    `SnmpContextv3Pool.SnmpContextv3Pool(String, int)`, `startDiscovery()`

### UsmDiscoveryBean

    public UsmDiscoveryBean(java.lang.String host,
                            int port,
                            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:
    `SnmpContextv3Pool.SnmpContextv3Pool(String, int, 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:
    `SnmpContextv3.setUserName(String)`, `SnmpContextv3.setUserAuthenticationPassword(String)`, `SnmpContextv3.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:
    `SnmpContextv3.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.

  See Also:
    `setAuthenticationDetails(String, String, int)`, `discoveryEngineId()`, `discoveryTimeLine()`

### 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.

  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.

  See Also:
    `startDiscovery()`, `discoveryEngineId()`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 4_12
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD