C - the proxy column type fo the table proxy.IC - the index proxy column type for the table proxy.IT - the model value type for index columns.T - the model value type for the columnar model values.R - the proxy row type for the rows of the table.Serializable, Iterable<IC>, Collection<IC>, TableModel, MutableSnmpProxy, SnmpCommitListener, SnmpProxyObject, SnmpTable<C,IC,IT,T,R>, SnmpTableRO<IC,C,IT,T,R>, SnmpTableUpdateListener<IC>public class SnmpTableImpl<IC extends SnmpProxyIndexColumn,C extends SnmpProxyColumn,IT,T,R extends SnmpProxyRow<IT,T>> extends SnmpTableImplRO<C,IC,IT,T,R> implements SnmpTable<C,IC,IT,T,R>
TableModel.SnmpTableImplRO.RowUpdateError, SnmpTableImplRO.SnmpColumnOidComparator, SnmpTableImplRO.SnmpProxyRowOidComparatorlistenerListcolumns, context, currentIndex, indexColumns, minIndex, pageSize, rowErrors, rowFactory, rowFilter, rows, tableEntryOID, updatingRows| Constructor | Description |
|---|---|
SnmpTableImpl(org.snmp4j.smi.OID tableEntryOID,
org.snmp4j.smi.OctetString context,
SnmpProxyCommitter snmpProxyCommitter,
SnmpProxyRowFactory<R,IT,T> rowFactory,
List<IC> indexColumns,
List<C> columns,
int pageSize) |
Creates a proxy table implementation based on the SNMP table entry object identifier and lists with the
index and regular column proxy objects as well as a page size to support paged table models.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
cellUpdated(int row,
int column,
SnmpValueChange change) |
|
protected void |
cellUpdateValidationFailure(int row,
int column,
SnmpValueChange change) |
|
void |
clear() |
Remove all rows of the proxy table without changing the target SNMP table at all.
|
void |
commitFailure(List<SnmpValuesChangeSet> failedChanges,
SnmpErrorStatus errorStatus,
int errorIndex) |
Indicates a failed commit operation.
|
void |
commitSuccess(List<SnmpValuesChangeSet> committedChanges) |
Indication of a successful commit.
|
boolean |
doChange(SnmpValuesChangeSet changeSet) |
Perform a change by adding it to the committer queue.
|
boolean |
doChange(SnmpValuesChangeSet changeSet,
boolean addToCommitter) |
Performs a change by validating it using the
SnmpProxyCommitter. |
org.snmp4j.smi.OID |
getCellOID(int column,
org.snmp4j.smi.OID index) |
|
SnmpCellUpdateListener |
getCellUpdateListener() |
Gets the cell update listener associated with this table.
|
SnmpProxyCommitter |
getCommitter() |
|
int |
getRowNumber(org.snmp4j.smi.OID rowIndex) |
Gets the row number for the specified SNMP row index value.
|
void |
insertRow(R newRow) |
Insert a new row into the table.
|
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
|
TaskId |
reload(SnmpService snmpService,
org.snmp4j.Target target,
VariableBindingMapper variableBindingMapper,
SnmpProxyReloadListener reloadListener) |
Reload the model content of the proxy object from the target SNMP entity asynchronously in the background.
|
R |
removeRow(int rowIndex) |
Removes a row from the model without changing the associated SNMP table.
|
R |
removeRow(org.snmp4j.smi.OID rowIndex) |
Removes a row from the model without changing the associated SNMP table.
|
void |
setCellUpdateListener(SnmpCellUpdateListener cellUpdateListener) |
Sets the cell update listener associated with this table.
|
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex) |
|
boolean |
undoChange(SnmpValuesChangeSet changeSet) |
Undo a change by adding the compensation change to the committer queue.
|
addTableModelListener, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerequals, hashCode, parallelStream, removeIf, spliterator, streamclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetContextgetContext, waitForTaskfireTableCellUpdatedadd, addAll, addError, beginUpdate, clearAllErrors, clearError, contains, containsAll, findColumn, finishUpdate, getCell, getColumnClass, getColumnCount, getColumnName, getColumnNumber, getColumns, getContext, getCurrentIndex, getError, getIndexColumns, getIndexOIDs, getIndexVariable, getIndexVariableBindings, getIndexVariables, getIndexVariableTemplates, getMinIndex, getNonPagedRowIndex, getOID, getPageSize, getRowCount, getRowFactory, getRowFilter, getRowIndex, getRowIndexes, getTableColumnModel, getValueAt, isEmpty, iterator, remove, removeAll, retainAll, setCurrentIndex, setMinIndex, setPageSize, setRowFactory, setRowFilter, size, toArray, toArray, toString, updateRow, waitForTaskaddError, clearAllErrors, clearError, getCell, getColumnNumber, getColumns, getCurrentIndex, getError, getIndexColumns, getIndexVariableBindings, getMinIndex, getOID, getPageSize, getRowFactory, getRowFilter, getRowIndex, getRowIndexes, getTableColumnModel, setCurrentIndex, setMinIndex, setPageSize, setRowFilterbeginUpdate, finishUpdate, updateRowaddTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, removeTableModelListenerpublic SnmpTableImpl(org.snmp4j.smi.OID tableEntryOID,
org.snmp4j.smi.OctetString context,
SnmpProxyCommitter snmpProxyCommitter,
SnmpProxyRowFactory<R,IT,T> rowFactory,
List<IC> indexColumns,
List<C> columns,
int pageSize)
tableEntryOID - the OID of the SNMP table Entry object (thus the table OID inclusive the entry suffix .1).context - the SNMP context associated with this proxy object.snmpProxyCommitter - the proxy committer used to commit changes to model values to the associated target SNMP entity.rowFactory - the factory for new model rows.indexColumns - the index proxy column objects.columns - the proxy column objects.pageSize - the page size for paged table models. A zero (or less) size disables paging.public SnmpProxyCommitter getCommitter()
getCommitter in interface MutableSnmpProxypublic void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelpublic SnmpCellUpdateListener getCellUpdateListener()
SnmpTablegetCellUpdateListener in interface SnmpTable<IC extends SnmpProxyIndexColumn,C extends SnmpProxyColumn,IT,T,R extends SnmpProxyRow<IT,T>>public void setCellUpdateListener(SnmpCellUpdateListener cellUpdateListener)
SnmpTablesetCellUpdateListener in interface SnmpTable<IC extends SnmpProxyIndexColumn,C extends SnmpProxyColumn,IT,T,R extends SnmpProxyRow<IT,T>>cellUpdateListener - the new cell update listener for this table.protected void cellUpdateValidationFailure(int row,
int column,
SnmpValueChange change)
protected void cellUpdated(int row,
int column,
SnmpValueChange change)
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic org.snmp4j.smi.OID getCellOID(int column,
org.snmp4j.smi.OID index)
public void insertRow(R newRow)
SnmpTableSnmpCommitListener.insertRow in interface SnmpTable<IC extends SnmpProxyIndexColumn,C extends SnmpProxyColumn,IT,T,R extends SnmpProxyRow<IT,T>>newRow - the new proxy row.public R removeRow(int rowIndex)
rowIndex - the zero based row index.public R removeRow(org.snmp4j.smi.OID rowIndex)
rowIndex - the SNMP row index (i.e., the OID suffix that identifies the row in the table).null if such a row could not be found.public void clear()
SnmpTableclear in interface Collection<IC extends SnmpProxyIndexColumn>clear in interface SnmpTable<IC extends SnmpProxyIndexColumn,C extends SnmpProxyColumn,IT,T,R extends SnmpProxyRow<IT,T>>clear in class SnmpTableImplRO<C extends SnmpProxyColumn,IC extends SnmpProxyIndexColumn,IT,T,R extends SnmpProxyRow<IT,T>>public void commitSuccess(List<SnmpValuesChangeSet> committedChanges)
SnmpCommitListenercommitSuccess in interface SnmpCommitListenercommittedChanges - the list of successfully committed change sets (each change set was committed atomically for itself).public void commitFailure(List<SnmpValuesChangeSet> failedChanges, SnmpErrorStatus errorStatus, int errorIndex)
SnmpCommitListenercommitFailure in interface SnmpCommitListenerfailedChanges - the changes that failed to commit (none of the changes within a single change set must have been committed, if
the change set was small enough to be committed atomically).errorStatus - the SNMP error status of the first failed change set.errorIndex - the index in the original list of changes committed that failed (zero based).public TaskId reload(SnmpService snmpService, org.snmp4j.Target target, VariableBindingMapper variableBindingMapper, SnmpProxyReloadListener reloadListener)
SnmpProxyObjectreload in interface SnmpProxyObjectreload in class SnmpTableImplRO<C extends SnmpProxyColumn,IC extends SnmpProxyIndexColumn,IT,T,R extends SnmpProxyRow<IT,T>>snmpService - the SNMP service to use.target - the SNMP target (i.e., address, timeouts, etc.) to use.variableBindingMapper - the variable binding mapper that maps the retrieved SNMP values to model values (based on SNMP types or
specific OID based mappings).reloadListener - a callback listener that is informed about the reloading status.public int getRowNumber(org.snmp4j.smi.OID rowIndex)
getRowNumber in interface SnmpTableRO<IC extends SnmpProxyIndexColumn,C extends SnmpProxyColumn,IT,T,R extends SnmpProxyRow<IT,T>>getRowNumber in class SnmpTableImplRO<C extends SnmpProxyColumn,IC extends SnmpProxyIndexColumn,IT,T,R extends SnmpProxyRow<IT,T>>rowIndex - a SNMP row index (i.e., the OID suffix that identifies a row in the target table).public boolean doChange(SnmpValuesChangeSet changeSet)
MutableSnmpProxydoChange in interface MutableSnmpProxychangeSet - the change to perform atomically.true if the change passed validation and thus was successfully added to the queue.public boolean doChange(SnmpValuesChangeSet changeSet, boolean addToCommitter)
SnmpProxyCommitter. Optionally the change is then also
added the the proxy committer queue.changeSet - a SnmpValuesChangeSet that contains changes to model objects that refer to cells of this proxy table.addToCommitter - if true, the changes will also be added to the proxy committer change queue for committing the
changes to the target SNMP table.true if the change set was valid. If not, no changes to the model and the target SNMP table
are performed.public boolean undoChange(SnmpValuesChangeSet changeSet)
MutableSnmpProxyundoChange in interface MutableSnmpProxychangeSet - the change to undo atomically.true if the undo change passed validation and thus was successfully added to the queue.Copyright © 2020 SNMP4J.org. All rights reserved.