Module org.snmp4j.agent
Package org.snmp4j.agent.mo
Interface MOMutableTableModel<R extends MOTableRow>
- All Superinterfaces:
MOTableModel<R>,MOTableRowFactory<R>
- All Known Implementing Classes:
DefaultMOMutableTableModel,UsmMIB.UsmTableModel
public interface MOMutableTableModel<R extends MOTableRow>
extends MOTableModel<R>, MOTableRowFactory<R>
The
MOMutableTableModel defines the interface for mutable
table models. Mutable table models support row creation and deletion through
SNMP SET operations.- Version:
- 3.0.0
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionAdds a row to the table.voidclear()Removes all rows.clear(MOTableRowFilter<R> filter) Remove all rows that do not match the given filter criteria from the model.Gets the factory instance used for creating rows for this model.removeRow(org.snmp4j.smi.OID index) Removes the row with the specified index from the table and returns it.voidsetRowFactory(MOTableRowFactory<R> rowFactory) Sets the factory instance to be used for creating rows for this model.Methods inherited from interface org.snmp4j.agent.mo.MOTableModel
containsRow, firstIndex, firstRow, getColumnCount, getRow, getRowCount, isEmpty, iterator, lastIndex, lastRow, tailIteratorMethods inherited from interface org.snmp4j.agent.mo.MOTableRowFactory
createRow, freeRow
-
Method Details
-
addRow
Adds a row to the table. If a row with the same index already exists it will be replaced and returned.- Parameters:
row- theMOTableRowinstance to add.- Returns:
- the previous row with the specified index or
nullif it did not have one.
-
removeRow
Removes the row with the specified index from the table and returns it.- Parameters:
index- the row index of the row to remove.- Returns:
- the removed row or
nullif the table did not contain such a row.
-
clear
void clear()Removes all rows. -
clear
Remove all rows that do not match the given filter criteria from the model.- Parameters:
filter- theMOTableRowFilterthat filters out the rows to delete.- Returns:
- a list of the removed rows that did not pass (match) the filter.
-
setRowFactory
Sets the factory instance to be used for creating rows for this model.- Parameters:
rowFactory- aMOTableRowFactoryinstance ornullto disable row creation.
-
getRowFactory
MOTableRowFactory<R> getRowFactory()Gets the factory instance used for creating rows for this model.- Returns:
- the row factory used for creating rows or
nullif row creation is not possible due to a missing factory. - Since:
- 2.4.0
-