com.tivoli.twg.snmp
Class TWGMIBItem2

java.lang.Object
  extended bycom.tivoli.twg.snmp.TWGMIBItem2
All Implemented Interfaces:
java.io.Serializable

public class TWGMIBItem2
extends java.lang.Object
implements java.io.Serializable

This class represents a MIB item. All of the characteristics of a particular element of a MIB are represented here. It is used to supply the information from the Director MIB repository on demand. NOTE: this class is ONLY instanciated by the Director Server.

See Also:
TWGRemoteMIB, Serialized Form

Field Summary
static int ACC_NOTACCESSIBLE
           
static int ACC_READCREATE
           
static int ACC_READONLY
           
static int ACC_READWRITE
           
static int ACC_UNKNOWN
           
static int ACC_WRITEONLY
           
protected  int access
           
protected  java.lang.String contactInfo
           
protected  java.lang.String description
           
protected  java.lang.String lastUpdated
           
protected  java.lang.String name
           
static int OBJECT_ITEM
           
protected  java.lang.String OID
           
protected  java.lang.String organization
           
protected  boolean Published
           
protected  java.lang.String Range
           
protected  int status
           
static int STATUS_CURRENT
           
static int STATUS_DEPRECATED
           
static int STATUS_MANDATORY
           
static int STATUS_OBSOLETE
           
static int STATUS_OPTIONAL
           
static int STATUS_UNKNOWN
           
protected  boolean Table
           
protected  long tag
           
static int TRAP_ITEM
           
protected  boolean trapItem
           
protected  int type
           
static int TYPE_BITS
           
static int TYPE_BITSTRING
           
static int TYPE_COUNTER
           
static int TYPE_COUNTER32
           
static int TYPE_COUNTER64
           
static int TYPE_DISPLAYSTRING
           
static int TYPE_GAUGE
           
static int TYPE_GAUGE32
           
static int TYPE_INTEGER
           
static int TYPE_IPADDRESS
           
static int TYPE_ITEM
           
static int TYPE_NETWORKADDRESS
           
static int TYPE_NSAPADDRESS
           
static int TYPE_OCTETSTRING
           
static int TYPE_OI
           
static int TYPE_OPAQUE
           
static int TYPE_SEQUENCE
           
static int TYPE_SEQUENCEOF
           
static int TYPE_TIMETICKS
           
static int TYPE_UNKNOWN
           
static int TYPE_UNSIGNED
           
static int TYPE_UNSIGNED32
           
protected  boolean typeItem
           
protected  java.lang.String typeString
           
protected  java.lang.String units
           
protected  com.tivoli.twg.MIBParser.OrderedHashtable Values
           
static int VERSION
           
static int VERSION_1
           
static int VERSION_2
           
static int VERSION_3
           
static int VERSION_4
           
 
Constructor Summary
TWGMIBItem2()
          INTERNAL USE ONLY Default Constructor NOTE: all data values are supplied by the MIB data repository
TWGMIBItem2(java.lang.String name, int access, int status, int type, java.lang.String typeStr, java.lang.String update, java.lang.String org, java.lang.String contact, java.lang.String description, java.lang.String units, java.lang.String OID, boolean trap, boolean typeItem)
          INTERNAL USE ONLY Constructor used in the Director Server to build an instance of this class in response to a query passed by TWGRemoteMIB.OIDLookup() NOTE: all data values are supplied by the MIB data repository
TWGMIBItem2(java.lang.String name, int access, int status, int type, java.lang.String typeStr, java.lang.String update, java.lang.String org, java.lang.String contact, java.lang.String description, java.lang.String units, java.lang.String OID, java.lang.String Range, java.util.Hashtable values, boolean Published, boolean Table, boolean trap, boolean typeItem)
          INTERNAL USE ONLY Constructor used in to build an instance of this class in response to a query passed by TWGRemoteMIB.OIDLookup() NOTE: all data values are supplied by the MIB data repository
TWGMIBItem2(TWGByteArrayInputStream Buffer, int persistentVersion)
          INTERNAL USE ONLY
TWGMIBItem2(com.tivoli.twg.snmp.TWGMIBItem mi)
          INTERNAL USE ONLY Constructor used in to build an instance of this class in response to a query passed by TWGRemoteMIB.OIDLookup() NOTE: all data values are supplied by the MIB data repository
 
Method Summary
 void AddValue(long Index, java.lang.String Value)
          INTERNAL USE ONLY
protected  void BuildBuffer(TWGByteArrayOutputStream Buffer, int persistentVersion)
          INTERNAL USE ONLY
 int getAccess()
          Queries the Access mode allowed for this MIB attribute.
 java.lang.String getContactInfo()
          Gets the contact information defined for this MIB item.
 java.lang.String getDescription()
          Queries the textual description for this MIB attribute.
 java.lang.String getLastUpdated()
          Gets the date of the last update
 java.lang.String getName()
          This method will return a string representing the texual name of this MIB element, as opposed to the OID, or dotted decimal notation.
 java.lang.String getOID()
          Queries the OID for this MIB attribute.
 java.lang.String getOrganization()
          Gets the organization defined for this MIB item.
 java.lang.String GetRange()
          If this MIB attribute has a restrictive range, such as maximum string length, or numeric limits, then this method will return a string representing those limits.
 int getStatus()
          Queries the Status of this MIB attribute.
 int getType()
          Queries the type represented by this MIB attribute.
 java.lang.String getTypeAsString()
          Return the syntax type name as a string.
 java.lang.String getUnitsLabel()
          Gets the units label for this objects value.
 java.lang.String GetValue(long Index)
          If this MIB attribute has an enumerated value list, this method will return a string representation for the passed numeric value.
 java.util.Enumeration GetValueIDs()
          If this MIB attribute has a enumerated value list associated with it, then this method will return of list of the numeric values that are allowed by that enumeration.
 java.util.Enumeration GetValueIDsReversed()
          If this MIB attribute has a enumerated value list associated with it, then this method will return of list of the numeric values that are allowed by that enumeration.
 java.util.Enumeration GetValueStrings()
          If this MIB attribute has a enumerated value list associated with it, then this method will return of list of the string constants that are allowed by that enumeration.
 java.util.Enumeration GetValueStringsReversed()
          If this MIB attribute has a enumerated value list associated with it, then this method will return of list of the string constants that are allowed by that enumeration.
 boolean IsPublished()
          INTERNAL USE ONLY Used by the Trap management code to determine if this particular item has been published to the Director Alert Management sub-system.
 boolean isTable()
          Indicates whether or not this object is a sequence or a descendent of a sequence - ie.
 boolean isTrap()
          Returns whether or not this TWGMIBItem2 is a trap.
 boolean isType()
          Returns whether or not this TWGMIBItem2 is a type.
 void LoadIPCCommand(Command cmd)
          INTERNAL USE ONLY
 com.tivoli.twg.snmp.TWGMIBItem MakeTWGMIBItem()
          INTERNAL USE ONLY
 void resolveForwardRef()
           
 void SetPublished(boolean bpub)
          INTERNAL USE ONLY Used by the Trap management code to determine if this particular item has been published to the Director Alert Management sub-system.
 void SetRange(java.lang.String Range)
          INTERNAL USE ONLY
 void setTable(boolean table)
          Allows this object to be marked as a sequence or a descendent of a sequence - ie.
 boolean ValuesPresent()
          Used to determine if this MIB attribute has an enumerated value list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

access

protected int access

status

protected int status

type

protected int type

typeString

protected java.lang.String typeString

lastUpdated

protected java.lang.String lastUpdated

organization

protected java.lang.String organization

contactInfo

protected java.lang.String contactInfo

description

protected java.lang.String description

units

protected java.lang.String units

OID

protected java.lang.String OID

Range

protected java.lang.String Range

Values

protected com.tivoli.twg.MIBParser.OrderedHashtable Values

Published

protected boolean Published

Table

protected boolean Table

trapItem

protected boolean trapItem

typeItem

protected boolean typeItem

tag

protected long tag

VERSION

public static final int VERSION
See Also:
Constant Field Values

VERSION_4

public static final int VERSION_4
See Also:
Constant Field Values

VERSION_3

public static final int VERSION_3
See Also:
Constant Field Values

VERSION_2

public static final int VERSION_2
See Also:
Constant Field Values

VERSION_1

public static final int VERSION_1
See Also:
Constant Field Values

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN
See Also:
Constant Field Values

TYPE_COUNTER

public static final int TYPE_COUNTER
See Also:
Constant Field Values

TYPE_GAUGE

public static final int TYPE_GAUGE
See Also:
Constant Field Values

TYPE_INTEGER

public static final int TYPE_INTEGER
See Also:
Constant Field Values

TYPE_IPADDRESS

public static final int TYPE_IPADDRESS
See Also:
Constant Field Values

TYPE_DISPLAYSTRING

public static final int TYPE_DISPLAYSTRING
See Also:
Constant Field Values

TYPE_NETWORKADDRESS

public static final int TYPE_NETWORKADDRESS
See Also:
Constant Field Values

TYPE_NSAPADDRESS

public static final int TYPE_NSAPADDRESS
See Also:
Constant Field Values

TYPE_OI

public static final int TYPE_OI
See Also:
Constant Field Values

TYPE_OCTETSTRING

public static final int TYPE_OCTETSTRING
See Also:
Constant Field Values

TYPE_OPAQUE

public static final int TYPE_OPAQUE
See Also:
Constant Field Values

TYPE_SEQUENCE

public static final int TYPE_SEQUENCE
See Also:
Constant Field Values

TYPE_SEQUENCEOF

public static final int TYPE_SEQUENCEOF
See Also:
Constant Field Values

TYPE_TIMETICKS

public static final int TYPE_TIMETICKS
See Also:
Constant Field Values

TYPE_BITSTRING

public static final int TYPE_BITSTRING
See Also:
Constant Field Values

TYPE_COUNTER64

public static final int TYPE_COUNTER64
See Also:
Constant Field Values

TYPE_UNSIGNED

public static final int TYPE_UNSIGNED
See Also:
Constant Field Values

TYPE_UNSIGNED32

public static final int TYPE_UNSIGNED32
See Also:
Constant Field Values

TYPE_COUNTER32

public static final int TYPE_COUNTER32
See Also:
Constant Field Values

TYPE_GAUGE32

public static final int TYPE_GAUGE32
See Also:
Constant Field Values

TYPE_BITS

public static final int TYPE_BITS
See Also:
Constant Field Values

ACC_UNKNOWN

public static final int ACC_UNKNOWN
See Also:
Constant Field Values

ACC_NOTACCESSIBLE

public static final int ACC_NOTACCESSIBLE
See Also:
Constant Field Values

ACC_READONLY

public static final int ACC_READONLY
See Also:
Constant Field Values

ACC_WRITEONLY

public static final int ACC_WRITEONLY
See Also:
Constant Field Values

ACC_READWRITE

public static final int ACC_READWRITE
See Also:
Constant Field Values

ACC_READCREATE

public static final int ACC_READCREATE
See Also:
Constant Field Values

STATUS_UNKNOWN

public static final int STATUS_UNKNOWN
See Also:
Constant Field Values

STATUS_MANDATORY

public static final int STATUS_MANDATORY
See Also:
Constant Field Values

STATUS_OPTIONAL

public static final int STATUS_OPTIONAL
See Also:
Constant Field Values

STATUS_OBSOLETE

public static final int STATUS_OBSOLETE
See Also:
Constant Field Values

STATUS_DEPRECATED

public static final int STATUS_DEPRECATED
See Also:
Constant Field Values

STATUS_CURRENT

public static final int STATUS_CURRENT
See Also:
Constant Field Values

TRAP_ITEM

public static final int TRAP_ITEM
See Also:
Constant Field Values

TYPE_ITEM

public static final int TYPE_ITEM
See Also:
Constant Field Values

OBJECT_ITEM

public static final int OBJECT_ITEM
See Also:
Constant Field Values
Constructor Detail

TWGMIBItem2

public TWGMIBItem2()
INTERNAL USE ONLY Default Constructor NOTE: all data values are supplied by the MIB data repository


TWGMIBItem2

public TWGMIBItem2(java.lang.String name,
                   int access,
                   int status,
                   int type,
                   java.lang.String typeStr,
                   java.lang.String update,
                   java.lang.String org,
                   java.lang.String contact,
                   java.lang.String description,
                   java.lang.String units,
                   java.lang.String OID,
                   boolean trap,
                   boolean typeItem)
INTERNAL USE ONLY Constructor used in the Director Server to build an instance of this class in response to a query passed by TWGRemoteMIB.OIDLookup() NOTE: all data values are supplied by the MIB data repository


TWGMIBItem2

public TWGMIBItem2(java.lang.String name,
                   int access,
                   int status,
                   int type,
                   java.lang.String typeStr,
                   java.lang.String update,
                   java.lang.String org,
                   java.lang.String contact,
                   java.lang.String description,
                   java.lang.String units,
                   java.lang.String OID,
                   java.lang.String Range,
                   java.util.Hashtable values,
                   boolean Published,
                   boolean Table,
                   boolean trap,
                   boolean typeItem)
INTERNAL USE ONLY Constructor used in to build an instance of this class in response to a query passed by TWGRemoteMIB.OIDLookup() NOTE: all data values are supplied by the MIB data repository


TWGMIBItem2

public TWGMIBItem2(com.tivoli.twg.snmp.TWGMIBItem mi)
INTERNAL USE ONLY Constructor used in to build an instance of this class in response to a query passed by TWGRemoteMIB.OIDLookup() NOTE: all data values are supplied by the MIB data repository


TWGMIBItem2

public TWGMIBItem2(TWGByteArrayInputStream Buffer,
                   int persistentVersion)
            throws TWGSNMPException
INTERNAL USE ONLY

Parameters:
Buffer -
persistentVersion -
Throws:
TWGSNMPException
Method Detail

MakeTWGMIBItem

public com.tivoli.twg.snmp.TWGMIBItem MakeTWGMIBItem()
INTERNAL USE ONLY


LoadIPCCommand

public void LoadIPCCommand(Command cmd)
INTERNAL USE ONLY


IsPublished

public boolean IsPublished()
INTERNAL USE ONLY Used by the Trap management code to determine if this particular item has been published to the Director Alert Management sub-system.


SetPublished

public void SetPublished(boolean bpub)
INTERNAL USE ONLY Used by the Trap management code to determine if this particular item has been published to the Director Alert Management sub-system.


SetRange

public void SetRange(java.lang.String Range)
INTERNAL USE ONLY


AddValue

public void AddValue(long Index,
                     java.lang.String Value)
INTERNAL USE ONLY


GetValue

public java.lang.String GetValue(long Index)
If this MIB attribute has an enumerated value list, this method will return a string representation for the passed numeric value. The user should use the ValuesPresent() method to determine if an enumeration is present.

Parameters:
Index - Numeric value to be translated.
Returns:
String The string representing the passed numeric value.

ValuesPresent

public boolean ValuesPresent()
Used to determine if this MIB attribute has an enumerated value list.

Returns:
boolen True if an enumeration is present, false if not.

GetValueIDs

public java.util.Enumeration GetValueIDs()
If this MIB attribute has a enumerated value list associated with it, then this method will return of list of the numeric values that are allowed by that enumeration.

Returns:
Enumeration A list of the numeric values allowed for this MIB attributes enumerated values.

GetValueStrings

public java.util.Enumeration GetValueStrings()
If this MIB attribute has a enumerated value list associated with it, then this method will return of list of the string constants that are allowed by that enumeration.

Returns:
Enumeration A list of the string constants allowed for this MIB attributes enumerated values.

GetValueIDsReversed

public java.util.Enumeration GetValueIDsReversed()
If this MIB attribute has a enumerated value list associated with it, then this method will return of list of the numeric values that are allowed by that enumeration. This method returns an enumeration in reverse order.

Returns:
Enumeration A list of the numeric values allowed for this MIB attributes enumerated values.

GetValueStringsReversed

public java.util.Enumeration GetValueStringsReversed()
If this MIB attribute has a enumerated value list associated with it, then this method will return of list of the string constants that are allowed by that enumeration. This method returns an enumeration in reverse order.

Returns:
Enumeration A list of the string constants allowed for this MIB attributes enumerated values.

GetRange

public java.lang.String GetRange()
If this MIB attribute has a restrictive range, such as maximum string length, or numeric limits, then this method will return a string representing those limits.

Returns:
String The Range string, if specified by the MIB, if not, then this will return null.

getName

public java.lang.String getName()
This method will return a string representing the texual name of this MIB element, as opposed to the OID, or dotted decimal notation.

Returns:
String The texual name of the MIB attribute.

getAccess

public int getAccess()
Queries the Access mode allowed for this MIB attribute.

Returns:
int Access mode:
  • ACC_UNKNOWN
  • ACC_NOTACCESSIBLE
  • ACC_READONLY
  • ACC_WRITEONLY
  • ACC_READWRITE
  • ACC_READCREATE

getStatus

public int getStatus()
Queries the Status of this MIB attribute.

Returns:
int Can return one of the following:
  • STATUS_UNKNOWN
  • STATUS_MANDATORY
  • STATUS_OPTIONAL
  • STATUS_OBSOLETE
  • STATUS_DEPRECATED
  • STATUS_CURRENT

getType

public int getType()
Queries the type represented by this MIB attribute.

Returns:
int Can be one of the following:
  • TYPE_UNKNOWN
  • TYPE_COUNTER
  • TYPE_GAUGE
  • TYPE_INTEGER
  • TYPE_IPADDRESS
  • TYPE_NETWORKADDRESS
  • TYPE_OI
  • TYPE_OCTETSTRING
  • TYPE_OPAQUE
  • TYPE_SEQUENCE
  • TYPE_SEQUENCEOF
  • TYPE_TIMETICKS
  • TYPE_BITSTRING
  • TYPE_COUNTER64
  • TYPE_UNSIGNED32
  • TYPE_COUNTER32
  • TYPE_GAUGE32
  • TYPE_BITS

getTypeAsString

public java.lang.String getTypeAsString()
Return the syntax type name as a string. If isType is is true, than this value is the Display Hints string.

Returns:
syntax name or display hints

getDescription

public java.lang.String getDescription()
Queries the textual description for this MIB attribute.

Returns:
String Returns a string that contains the description for this MIB attribute, as defined by the MIB.

getLastUpdated

public java.lang.String getLastUpdated()
Gets the date of the last update

Returns:
String Returns a string that contains the date of the last update for this MIB attribute, as defined by the MIB. Can be null.

getOrganization

public java.lang.String getOrganization()
Gets the organization defined for this MIB item.

Returns:
String Returns a string that contains the organization for this MIB attribute, as defined by the MIB. Can be null.

getContactInfo

public java.lang.String getContactInfo()
Gets the contact information defined for this MIB item.

Returns:
String Returns a string that contains the contact info for this MIB attribute, as defined by the MIB. Can be null.

getUnitsLabel

public java.lang.String getUnitsLabel()
Gets the units label for this objects value.

Returns:
String Returns a string that contains the units label for this MIB attribute, as defined by the MIB. Can be null.

getOID

public java.lang.String getOID()
Queries the OID for this MIB attribute.

Returns:
String Returns a string with the OID for this MIB attribute in dotted decimal notation.

isTable

public boolean isTable()
Indicates whether or not this object is a sequence or a descendent of a sequence - ie. a Table item.

Returns:
boolean returns true if this object is a sequence or a descendent of a sequence; false otherwise

isTrap

public boolean isTrap()
Returns whether or not this TWGMIBItem2 is a trap. Very important since TRAP-TYPEs can have OIDs equal to OBJECT-TYPE OIDs.

Returns:
true if a trap, false otherwise

isType

public boolean isType()
Returns whether or not this TWGMIBItem2 is a type. Types don't have any OID associated with them.

Returns:
true if a type, false otherwise

setTable

public void setTable(boolean table)
Allows this object to be marked as a sequence or a descendent of a sequence - ie. a Table item(true), or not (false).

Parameters:
table - true if this object is a sequence or a descendent of a sequence; false otherwise

resolveForwardRef

public void resolveForwardRef()
                       throws TWGSNMPException
Throws:
TWGSNMPException

BuildBuffer

protected void BuildBuffer(TWGByteArrayOutputStream Buffer,
                           int persistentVersion)
INTERNAL USE ONLY