com.h3c.util.snmp.command

## Class SnmpConnectionConfiguration

- java.lang.Object
- - com.h3c.util.snmp.command.SnmpConnectionConfiguration

- All Implemented Interfaces:
    Serializable

      public final class SnmpConnectionConfiguration
      extends Object
      implements Serializable

  SNMP Connection Configuration.
  See Also:
    Serialized Form

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SnmpConnectionConfiguration` | `forSnmpV1(int timeout, int retries)` Creates an SNMP connection configuration to SNMP version 1.
    `static SnmpConnectionConfiguration` | `forSnmpV2(int timeout, int retries)` Creates an SNMP connection configuration to SNMP version 2.
    `static SnmpConnectionConfiguration` | `forSnmpV3(Usm.AuthorizationType authorizationType, Usm.PrivacyType privacyType, int timeout, int retries)` Creates an SNMP connection configuration to SNMP version 3.
    `Usm.AuthorizationType` | `getAuthorizationType()` Gets the authorization type.
    `Usm.PrivacyType` | `getPrivacyType()` Gets the privacy type.
    `int` | `getRetries()` Gets the number of times to retry when a timeout exception is launched.
    `SnmpVersionType` | `getSnmpVersion()` Gets the SNMP version.
    `int` | `getTimeout()` Gets the connection timeout.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### forSnmpV1

          public static SnmpConnectionConfiguration forSnmpV1(int timeout,
                                              int retries)

      Creates an SNMP connection configuration to SNMP version 1.
      Parameters:
        `timeout` - Connection timeout.
        `retries` - Number of times to retry when the timeout is exceeded.
      Returns:
        An SNMP connection configuration to SNMP version 1.

    - #### forSnmpV2

          public static SnmpConnectionConfiguration forSnmpV2(int timeout,
                                              int retries)

      Creates an SNMP connection configuration to SNMP version 2.
      Parameters:
        `timeout` - Connection timeout.
        `retries` - Number of times to retry when the timeout is exceeded.
      Returns:
        An SNMP connection configuration to SNMP version 2.

    - #### forSnmpV3

          public static SnmpConnectionConfiguration forSnmpV3(Usm.AuthorizationType authorizationType,
                                              Usm.PrivacyType privacyType,
                                              int timeout,
                                              int retries)

      Creates an SNMP connection configuration to SNMP version 3.
      Parameters:
        `authorizationType` - Authorization type.
        `privacyType` - Privacy type.
        `timeout` - Connection timeout.
        `retries` - Number of times to retry when the timeout is exceeded.
      Returns:
        An SNMP connection configuration to SNMP version 3.

    - #### getSnmpVersion

          public SnmpVersionType getSnmpVersion()

      Gets the SNMP version.
      Returns:
        the SNMP version.

    - #### getAuthorizationType

          public Usm.AuthorizationType getAuthorizationType()

      Gets the authorization type.
      Returns:
        the authorization type.

    - #### getPrivacyType

          public Usm.PrivacyType getPrivacyType()

      Gets the privacy type.
      Returns:
        the privacy type.

    - #### getTimeout

          public int getTimeout()

      Gets the connection timeout.
      Returns:
        the connection timeout.

    - #### getRetries

          public int getRetries()

      Gets the number of times to retry when a timeout exception is launched.
      Returns:
        the number of times to retry when the timeout is exceeded.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All Rights Reserved.