R
- The row type of the rows managed by this RowStatus.public class RowStatus<R extends MOTableRow> extends MOMutableColumn<org.snmp4j.smi.Integer32> implements MOChangeListener, MOTableRowListener<R>
RowStatus
class implements the columnar object TC RowStatus.
The RowStatus textual convention is used to manage the creation and deletion
of conceptual rows, and is used as the value of the SYNTAX clause for the
status column of a conceptual row. See RFC 2579.
The RowStatus column controls row creation and deletion in SNMP tables with
READ-CREATE maximum access. Since the state of a dynamic row is/may be
important to dependent rows / other objects of an agent, row status change
events can be propagated to other objects through registering
RowStatusListener
s.Modifier and Type | Class and Description |
---|---|
static class |
RowStatus.ActiveRowsFilter<R extends MOTableRow>
The
ActiveRowsFilter is a MOTableRowFilter that
returns only the active rows of a table with a RowStatus column. |
Modifier and Type | Field and Description |
---|---|
static int |
active |
static int |
createAndGo |
static int |
createAndWait |
static int |
destroy |
static int |
notExistant |
static int |
notInService |
static int |
notReady |
Constructor and Description |
---|
RowStatus(int columnID)
Creates a RowStatus column with the specified column sub-identifier and
maximum access of 'read-create'.
|
RowStatus(int columnID,
MOAccess access)
Creates a RowStatus column with the specified column sub-identifier.
|
Modifier and Type | Method and Description |
---|---|
void |
addRowStatusListener(RowStatusListener l) |
void |
afterMOChange(MOChangeEvent changeEvent)
A change has been committed.
|
void |
afterPrepareMOChange(MOChangeEvent changeEvent)
A change has been prepared.
|
protected void |
assignNewValue(SubRequest subRequest,
MOTableRow row,
int column,
int newValue) |
void |
beforeMOChange(MOChangeEvent changeEvent)
A ManagedObject change is being committed.
|
void |
beforePrepareMOChange(MOChangeEvent changeEvent)
A ManagedObject change is being prepared.
|
void |
commit(SubRequest subRequest,
MOTableRow row,
MOTableRow changeSet,
int column) |
protected void |
fireRowStatusChanged(RowStatusEvent event) |
void |
get(SubRequest subRequest,
MOTableRow row,
int column)
Process a get sub-request for the specified table row and column.
|
protected boolean |
isReady(MOTableRow row,
int rowStatusColumn) |
protected boolean |
isReady(MOTableRow row,
int rowStatusColumn,
MOTableRow changeSet) |
static boolean |
isRowActive(MOTableRow row,
int rowStatusColumnIndex)
Tests if the specified row is active.
|
boolean |
isVolatile(MOTableRow row,
int column)
Tests if the supplied row is volatile or persistent.
|
void |
prepare(SubRequest subRequest,
MOTableRow row,
MOTableRow changeSet,
int column) |
void |
removeRowStatusListener(RowStatusListener l) |
void |
rowChanged(MOTableRowEvent event)
A column or a complete row is changed/has been changed.
|
<R extends MOTableRow> |
setTable(MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table)
Sets the table instance this columnar object is contained in.
|
void |
undo(SubRequest subRequest,
MOTableRow row,
int column) |
void |
unsetTable(MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table)
Unsets the table instance and thus unregisters itself as
MOChangeListener and MOTableRowListener . |
addMOValueValidationListener, cleanup, getDefaultValue, isMandatory, isMutableInService, removeMOValueValidationListener, setDefaultValue, setMandatory, setMutableInService, toString, validate, validateSetRequest
compareTo, getAccess, getColumnID, getRestoreValue, getStoreValue, getSyntax, getTable, getValue, setAccess, setColumnID, setSyntax
public static final int notExistant
public static final int active
public static final int notInService
public static final int notReady
public static final int createAndGo
public static final int createAndWait
public static final int destroy
public RowStatus(int columnID)
columnID
- a column sub-identifier.public RowStatus(int columnID, MOAccess access)
columnID
- a column sub-identifier.access
- the maximum access for the RowStatus column (should be READ-CREATE).public <R extends MOTableRow> void setTable(MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table)
MOTable
instance to register the table with
the RowStatus column. When called, this RowStatus registers itself as
MOChangeListener
and MOTableRowListener
.setTable
in class MOColumn<org.snmp4j.smi.Integer32>
R
- the MOTableRow
type supported by the table.table
- the MOTable
instance where this column is contained in.public void unsetTable(MOTable<R,? extends MOColumn,? extends MOTableModel<R>> table)
MOChangeListener
and MOTableRowListener
.table
- the MOTable
instance where this column was part of.protected boolean isReady(MOTableRow row, int rowStatusColumn)
protected boolean isReady(MOTableRow row, int rowStatusColumn, MOTableRow changeSet)
public void prepare(SubRequest subRequest, MOTableRow row, MOTableRow changeSet, int column)
prepare
in class MOMutableColumn<org.snmp4j.smi.Integer32>
public void commit(SubRequest subRequest, MOTableRow row, MOTableRow changeSet, int column)
commit
in class MOMutableColumn<org.snmp4j.smi.Integer32>
protected void assignNewValue(SubRequest subRequest, MOTableRow row, int column, int newValue)
public void undo(SubRequest subRequest, MOTableRow row, int column)
undo
in class MOMutableColumn<org.snmp4j.smi.Integer32>
public void beforePrepareMOChange(MOChangeEvent changeEvent)
MOChangeListener
beforePrepareMOChange
in interface MOChangeListener
changeEvent
- the change event object.public void beforeMOChange(MOChangeEvent changeEvent)
MOChangeListener
NOTE: Canceling the commit phase must be avoided. Setting a deny reason
has only an effect if DeniableEventObject.isDeniable()
returns
true
. Otherwise, you will need to throw an exception.
beforeMOChange
in interface MOChangeListener
changeEvent
- the change event object.public void afterMOChange(MOChangeEvent changeEvent)
MOChangeListener
afterMOChange
in interface MOChangeListener
changeEvent
- the change event object.public void afterPrepareMOChange(MOChangeEvent changeEvent)
MOChangeListener
afterPrepareMOChange
in interface MOChangeListener
changeEvent
- the change event object.public void addRowStatusListener(RowStatusListener l)
public void removeRowStatusListener(RowStatusListener l)
protected void fireRowStatusChanged(RowStatusEvent event)
public static boolean isRowActive(MOTableRow row, int rowStatusColumnIndex)
row
- a row with a RowStatus column.rowStatusColumnIndex
- the column index of the RowStatus column in row
.true
if row
is active.public void rowChanged(MOTableRowEvent event)
MOTableRowListener
rowChanged
in interface MOTableRowListener<R extends MOTableRow>
event
- a MOTableRowEvent
describing the event. To veto the event
the MOTableRowEvent.setVetoStatus(int)
and optionally also the
MOTableRowEvent.setVetoColumn(int)
can be called.public boolean isVolatile(MOTableRow row, int column)
MOColumn
isVolatile
in class MOColumn<org.snmp4j.smi.Integer32>
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 void get(SubRequest subRequest, MOTableRow row, int column)
MOColumn
Copyright © 2018 SNMP4J.org. All rights reserved.