com.h3c.util.snmp.command

## Class Oid

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

- All Implemented Interfaces:
    Serializable

      public final class Oid
      extends Object
      implements Serializable

  Object identifier (OID). Each OID identifies a variable that can be read or set via SNMP.

  Management information base (MIB). MIBs describe the structure of the management data of a device subsystem; they use a hierarchical name space containing object identifiers (OID). Each OID identifies a variable that can be read or set via SNMP. The MIB associates each OID with a readable label (Serves as a data dictionary).

  The MIB, or Management Information Base, is an ASCII text file that describes SNMP network elements as a list of data objects (Like a dictionary of the SNMP language). Every object referred to in an SNMP message must be listed in the MIB. The fundamental purpose of the MIB is to translate numerical strings into human-readable text. When an SNMP device sends a Trap or other message, it identifies each data object in the message with a number string called an object identifier, or OID. (OIDs are defined more fully later in this paper).

  MIBs use the notation defined by ASN.1 (Abstract Syntax Notation One).

  This is an example of a SNMP MIB file entry:

       serialNumberAtt4     OBJECT-TYPE
       SYNTAX               DmiDisplaystring
       ACCESS               read-only
       STATUS               mandatory
       DESCRIPTION          ""
       REFERENCE            "'DMTF|ComponentID|001' 4"
       ::= { dMTFComponentIDEntry 4 }

  In computing, an object identifier or OID is an identifier used to name an object (compare URN). Structurally, an OID consists of a node in a hierarchically-assigned namespace, formally defined using the ITU-T's ASN.1 standard.[citation needed] Successive numbers of the nodes, starting at the root of the tree, identify each node in the tree. Designers set up new nodes by registering them under the node's registration authority. The root of the tree contains the following three arcs:

       0: ITU-T
       1: ISO
       2: joint-iso-itu-t

  See Also:
    Serialized Form

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `String` | `getId()` Gets the id.
    `int` | `hashCode()`
    `String` | `toString()`
    `static Oid` | `valueOf(String oid)` Creates an object id from a string representation (For example: 1.3.6.1.4.1.11).

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

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

- - ### Method Detail

    - #### valueOf

          public static Oid valueOf(String oid)
                             throws NullPointerException,
                                    IllegalArgumentException

      Creates an object id from a string representation (For example: 1.3.6.1.4.1.11).
      Parameters:
        `oid` - Object identifier.
      Returns:
        An Oid instance for the given `oid`.
      Throws:
        `NullPointerException` - If `oid` is null.
        `IllegalArgumentException` - If `oid` is empty or it has an invalid format.

    - #### getId

          public String getId()

      Gets the id.
      Returns:
        The id.

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All Rights Reserved.