HOME

com.ireasoning.protocol.snmp
Class SnmpTableEntry

java.lang.Object
  extended bycom.ireasoning.protocol.snmp.SnmpTableEntry
All Implemented Interfaces:
Serializable

public abstract class SnmpTableEntry
extends Object
implements Serializable

This class represents SNMP table entry (row)

See Also:
Serialized Form

Field Summary
protected  Vector _dependents
          A collection of its dependent rows
protected  SnmpOID _oid
           
protected  String _suffix
          The index suffix of this row
protected  SnmpTable _table
          This SnmpTable object which contains this object
 
Constructor Summary
SnmpTableEntry(SnmpTable table)
          Constructor
 
Method Summary
 void addDependentRow(SnmpTable table, SnmpTableEntry entry)
          Adds a new row which depends on this row.
 void addRow()
          Adds itself to the table.
 ArrayList deleteDependentRows()
          Deletes all its dependent rows
static String getIndexString(String text, boolean addLength)
          Helper method, converts text to index string format.
static String getIndexString(String text, boolean addLength, boolean convertDigit)
          Helper method, converts text to index string format.
abstract  String getIndexSuffix()
          Returns the suffix
 SnmpOID getOID()
          Returns the oid value set by setOID method
static String physAddressToIndexSuffix(String physAddress)
          Converts PhysAddress to the index suffix.
abstract  void set(int index, SnmpDataType value)
          Sets the value of table column at specified index
 void setIndexSuffix(String suffix)
          Sets index suffix
 void setOID(SnmpOID oid)
          Sets OID value for this entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_table

protected SnmpTable _table
This SnmpTable object which contains this object


_suffix

protected String _suffix
The index suffix of this row


_dependents

protected Vector _dependents
A collection of its dependent rows


_oid

protected SnmpOID _oid
Constructor Detail

SnmpTableEntry

public SnmpTableEntry(SnmpTable table)
Constructor

Parameters:
table - the table which contain this row
Method Detail

addRow

public void addRow()
Adds itself to the table. Row wont get added to the tree until this method is called


getIndexSuffix

public abstract String getIndexSuffix()
Returns the suffix


set

public abstract void set(int index,
                         SnmpDataType value)
Sets the value of table column at specified index


setIndexSuffix

public void setIndexSuffix(String suffix)
Sets index suffix

Parameters:
suffix - the new suffix

getIndexString

public static String getIndexString(String text,
                                    boolean addLength)
Helper method, converts text to index string format. Digits in it are not converted to ascii code.

Parameters:
addLength - true to prepend number of digits to the returned index string
Returns:
the index string which does not start with '.'

getIndexString

public static String getIndexString(String text,
                                    boolean addLength,
                                    boolean convertDigit)
Helper method, converts text to index string format.

Parameters:
addLength - true to prepend number of digits to the returned index string
convertDigit - if true, convert digit to ascii code.
Returns:
the index string which does not start with '.'

physAddressToIndexSuffix

public static String physAddressToIndexSuffix(String physAddress)
Converts PhysAddress to the index suffix.

See Also:
SnmpOctetString.convertPhysAddress(java.lang.String)

addDependentRow

public void addDependentRow(SnmpTable table,
                            SnmpTableEntry entry)
Adds a new row which depends on this row. Dependent row will be deleted if this row gets deleted

Parameters:
table - table object
entry - dependent row to be added

deleteDependentRows

public ArrayList deleteDependentRows()
Deletes all its dependent rows


getOID

public SnmpOID getOID()
Returns the oid value set by setOID method


setOID

public void setOID(SnmpOID oid)
Sets OID value for this entry. This oid will be used in getOID() method.

Parameters:
oid - OID of an instance node
See Also:
getOID()

HOME

Copyright © 2002 iReasoning Inc. All Rights Reserved.