com.h3c.util.snmp

## Class SnmpWalkTable

- java.lang.Object
- - com.h3c.util.snmp.SnmpWalkTable

-     public class SnmpWalkTable
      extends Object

  SNMP walk table data store of SNMP response messages.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEndResponse(SnmpResponse response, int nValidVBs)` Set the end response, if nValidVBs > 0 there are valid variable bindings in the last response.
    `void` | `addResponse(SnmpResponse response)` Adds the response to the list.
    `int` | `getNumCols()` Returns the number of columns in the walk table.
    `int` | `getNumRows()` Returns the number of valid rows in all the responses.
    `int` | `getNumRowsPerResponse()` Returns the number of rows per response.
    `SnmpField` | `getOid(int r, int c)` Use this method to access the OID at the specified row and column.
    `SnmpField` | `getVal(int r, int c)` Use this method to access the value at the specified row and column.
    `String` | `toString()` Returns a display string representation of the walk table.
    `String` | `toStringColRow()` Returns a display string representation of the walk table in column-row order.

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

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

- - ### Method Detail

    - #### addResponse

          public void addResponse(SnmpResponse response)

      Adds the response to the list.
      Parameters:
        `response` - message to add

    - #### addEndResponse

          public void addEndResponse(SnmpResponse response,
                            int nValidVBs)

      Set the end response, if nValidVBs > 0 there are valid variable bindings in the last response.
      Parameters:
        `response` - message to set as the end message
        `nValidVBs` - integer number of valid variable bindings in the message

    - #### getNumRows

          public int getNumRows()

      Returns the number of valid rows in all the responses.
      Returns:
        number of valid rows

    - #### getNumCols

          public int getNumCols()

      Returns the number of columns in the walk table.
      Returns:
        number of columns

    - #### getNumRowsPerResponse

          public int getNumRowsPerResponse()

      Returns the number of rows per response.
      Returns:
        number of rows

    - #### getOid

          public SnmpField getOid(int r,
                         int c)

      Use this method to access the OID at the specified row and column.
      Parameters:
        `r` - table row index
        `c` - table column index
      Returns:
        OID at the row and column

    - #### getVal

          public SnmpField getVal(int r,
                         int c)

      Use this method to access the value at the specified row and column.
      Parameters:
        `c` - table column index
        `r` - table row index
      Returns:
        SNMP field at the column and row

    - #### toString

          public String toString()

      Returns a display string representation of the walk table.
      Overrides:
        `toString` in class `Object`
      Returns:
        display string

    - #### toStringColRow

          public String toStringColRow()

      Returns a display string representation of the walk table in column-row order.
      Returns:
        display string

Copyright © 2014. All Rights Reserved.