org.snmp4j.agent.mo
Class MOColumn

java.lang.Object
  extended by org.snmp4j.agent.mo.MOColumn
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
MOMutableColumn, TimeStamp

public class MOColumn
extends java.lang.Object
implements java.lang.Comparable

The MOColumn class represents columnar SMI objects. It represents all instances of a table's column not only a single instance (cell).

Objects represented by MOColumn cannot be modified via SNMP, thus MOColumn supports read-only maximum access only.

Version:
1.0
Author:
Frank Fock
See Also:
MOMutableColumn

Constructor Summary
MOColumn(int columnID, int syntax)
          Creates a read-only column object with the given column and syntax.
MOColumn(int columnID, int syntax, MOAccess access)
          Creates a column object with the given column, syntax, and maximum access.
 
Method Summary
 int compareTo(java.lang.Object column)
          Compares this managed object column by its ID with another column.
 void get(SubRequest subRequest, MOTableRow row, int column)
           
 MOAccess getAccess()
           
 int getColumnID()
           
 int getSyntax()
           
 MOTable getTable()
           
 org.snmp4j.smi.Variable getValue(MOTableRow row, int column)
           
 boolean isVolatile(MOTableRow row, int column)
          Tests if the supplied row is volatile or persistent.
 void setAccess(MOAccess access)
           
 void setColumnID(int columnID)
           
 void setSyntax(int syntax)
           
 void setTable(MOTable table)
          Sets the table instance this columnar object is contained in.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MOColumn

public MOColumn(int columnID,
                int syntax)
Creates a read-only column object with the given column and syntax.

Parameters:
columnID - the column ID which is ID the last sub-indentifer of the corresponding OBJECT-TYPE definition.
syntax - the syntax of the objects in this column. See SMIConstants for possible values.

MOColumn

public MOColumn(int columnID,
                int syntax,
                MOAccess access)
Creates a column object with the given column, syntax, and maximum access. Since MOColumn only supports read-only columns the only reasonable values for access are 'not-accessible' and 'read-only'. Generally this constructor should not be called directly.

Parameters:
columnID - the column ID which is ID the last sub-indentifer of the corresponding OBJECT-TYPE definition.
syntax - the syntax of the objects in this column. See SMIConstants for possible values.
access - the maximum access of the column.
Method Detail

setColumnID

public void setColumnID(int columnID)

setSyntax

public void setSyntax(int syntax)

setAccess

public void setAccess(MOAccess access)

setTable

public void setTable(MOTable table)
Sets the table instance this columnar object is contained in. This method should be called by MOTable instance to register the table with the column.

Parameters:
table - the MOTable instance where this column is contained in.

getColumnID

public int getColumnID()

getSyntax

public int getSyntax()

getAccess

public MOAccess getAccess()

getTable

public MOTable getTable()

getValue

public org.snmp4j.smi.Variable getValue(MOTableRow row,
                                        int column)

isVolatile

public boolean isVolatile(MOTableRow row,
                          int column)
Tests if the supplied row is volatile or persistent. If volatile then the row will not be saved when the table is saved to persistent storage.

Parameters:
row - a row of the table where this column is part of.
column - the column index of this column in row.
Returns:
true if row should not be

compareTo

public int compareTo(java.lang.Object column)
Compares this managed object column by its ID with another column.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
column - another MOColumn.
Returns:
int a negative integer, zero, or a positive integer as this column ID is less than, equal to, or greater than the specified object's column ID.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

get

public void get(SubRequest subRequest,
                MOTableRow row,
                int column)

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.