java.lang.Comparable
MOMutableColumn
, TimeStamp
public class MOColumn<V extends org.snmp4j.smi.Variable>
extends java.lang.Object
implements java.lang.Comparable
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.MOMutableColumn
Constructor | Description |
---|---|
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.
|
Modifier and Type | Method | Description |
---|---|---|
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) |
Process a get sub-request for the specified table row and column.
|
MOAccess |
getAccess() |
|
int |
getColumnID() |
|
org.snmp4j.smi.Variable |
getRestoreValue(org.snmp4j.smi.Variable[] rowValues,
int column) |
Return the restore value for this column and the given row.
|
org.snmp4j.smi.Variable |
getStoreValue(MOTableRow row,
int column) |
Return the content of this column's value of the given row for persistent storage.
|
int |
getSyntax() |
|
MOTable |
getTable() |
|
V |
getValue(MOTableRow row,
int column,
SubRequest subRequest) |
Gets the value of the specified column from the provided row.
|
boolean |
isVolatile(MOTableRow<V> row,
int column) |
Tests if the supplied row is volatile or persistent.
|
void |
setAccess(MOAccess access) |
|
void |
setColumnID(int columnID) |
|
void |
setSyntax(int syntax) |
|
<R extends MOTableRow> |
setTable(MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table) |
Sets the table instance this columnar object is contained in.
|
java.lang.String |
toString() |
public MOColumn(int columnID, int syntax)
columnID
- the column ID which is ID the last sub-identifier of the corresponding
OBJECT-TYPE definition.syntax
- the syntax of the objects in this column. See SMIConstants
for
possible values.public MOColumn(int columnID, int syntax, MOAccess access)
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.columnID
- the column ID which is ID the last sub-identifier 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.public void setColumnID(int columnID)
public void setSyntax(int syntax)
public void setAccess(MOAccess access)
public <R extends MOTableRow> void setTable(MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table)
MOTable
instance to register the table with
the column.R
- the MOTableRow
type supported by the table.table
- the MOTable
instance where this column is contained in.public int getColumnID()
public int getSyntax()
public MOAccess getAccess()
public MOTable getTable()
public V getValue(MOTableRow row, int column, SubRequest subRequest)
subRequest
parameter provides information on the currently processed
SNMP request if the value retrieval is trigger by a SNMP command.row
- the row with the value to be returned.column
- the column index pointing to the column to return in the above row.subRequest
- an optional sub-request on which behalf this value retrieval is executed.null
if such a value does not exist.public boolean isVolatile(MOTableRow<V> row, int column)
row
- a row of the table where this column is part of.column
- the column index of this column in row
.true
if row
should not bepublic org.snmp4j.smi.Variable getRestoreValue(org.snmp4j.smi.Variable[] rowValues, int column)
rowValues
- a row of the table where this column is part of.column
- the column index of this column in row
.rowValues[column]
.public org.snmp4j.smi.Variable getStoreValue(MOTableRow row, int column)
row
- a row of the table where this column is part of.column
- the column index of this column in row
.row
and column
.public int compareTo(java.lang.Object column)
compareTo
in interface java.lang.Comparable<V extends org.snmp4j.smi.Variable>
column
- another MOColumn
.public java.lang.String toString()
toString
in class java.lang.Object
public void get(SubRequest subRequest, MOTableRow row, int column)
subRequest
- the GET sub-request to execute.row
- the row that contains the value to return in the GET response PDU.column
- the column index of the value to return in subRequest
Copyright © 2018 SNMP4J.org. All rights reserved.