Class DefaultAgentXSharedMOTable<R extends org.snmp4j.agent.mo.MOTableRow, C extends org.snmp4j.agent.mo.MOColumn, M extends org.snmp4j.agent.mo.MOTableModel<R>>
java.lang.Object
org.snmp4j.agent.mo.DefaultMOTable<R,C,M>
org.snmp4j.agent.agentx.subagent.DefaultAgentXSharedMOTable<R,C,M>
- All Implemented Interfaces:
AgentXSharedMOTable<R,C, M>, AgentXSharedMutableMOTable<R, C, M>, org.snmp4j.agent.ManagedObject<org.snmp4j.agent.request.SubRequest<?>>, org.snmp4j.agent.ManagedObjectValueAccess<org.snmp4j.agent.request.SubRequest<?>>, org.snmp4j.agent.mo.ChangeableManagedObject<org.snmp4j.agent.request.SubRequest<?>>, org.snmp4j.agent.mo.GenericManagedObject, org.snmp4j.agent.mo.MOTable<R, C, M>, org.snmp4j.agent.MOScope, org.snmp4j.agent.RandomAccessManagedObject<org.snmp4j.agent.request.SubRequest<?>>, org.snmp4j.agent.RegisteredManagedObject<org.snmp4j.agent.request.SubRequest<?>>, org.snmp4j.agent.SerializableManagedObject<org.snmp4j.agent.request.SubRequest<?>>
public class DefaultAgentXSharedMOTable<R extends org.snmp4j.agent.mo.MOTableRow, C extends org.snmp4j.agent.mo.MOColumn, M extends org.snmp4j.agent.mo.MOTableModel<R>>
extends org.snmp4j.agent.mo.DefaultMOTable<R,C,M>
implements AgentXSharedMutableMOTable<R,C,M>
The
DefaultAgentXSharedMOTable class is a default implementation for a shared table. It supports dynamic
(while AgentX session is up) row creation and deletion.- Version:
- 2.1
- Author:
- Frank Fock
-
Nested Class Summary
Nested classes/interfaces inherited from class org.snmp4j.agent.mo.DefaultMOTable
org.snmp4j.agent.mo.DefaultMOTable.ChangeSet -
Field Summary
Fields inherited from class org.snmp4j.agent.mo.DefaultMOTable
moChangeListeners, model, moTableRowListeners, newRows, pendingChanges, rowModificationControlColumns -
Constructor Summary
ConstructorsConstructorDescriptionDefaultAgentXSharedMOTable(org.snmp4j.smi.OID oid, org.snmp4j.agent.mo.MOTableIndex indexDef, C[] columns) Creates a new shared table with the specified "Entry" OID, INDEX, columns, and aDefaultMOMutableTableModelas table model.DefaultAgentXSharedMOTable(org.snmp4j.smi.OID oid, org.snmp4j.agent.mo.MOTableIndex indexDef, C[] columns, M model) Creates a new shared table with the specified "Entry" OID, INDEX, columns, and aDefaultMOMutableTableModelas table model. -
Method Summary
Modifier and TypeMethodDescriptionbooleanchangeRowIndex(org.snmp4j.smi.OID oldIndex, org.snmp4j.smi.OID newIndex) Change the row index of a row in this shared table and trigger index allocation updates indirectly by firing a newMOTableRowEvent.UPDATEDevent.Returns the shared table support object this shared table uses.byteGets the index allocation mode that overrides the allocation mode inherited from the shared table support for index allocation operations for this shared table.byteGets the index priority that overrides the priority inherited from the shared table support for index allocation operations for this shared table.voidsetAgentXSharedMOTableSupport(AgentXSharedMOTableSupport<R, ?> sharedTableSupport) Sets the shared table support that this shared table should be use to (de)register rows and (de)allocate indexes while this shared table is part of an connected AgentX session.voidsetOverrideIndexAllocationMode(byte overrideIndexAllocationMode) Sets the index allocation mode that overrides the allocation mode inherited from the shared table support for index allocation operations for this shared table.voidsetOverridePriority(byte overridePriority) Sets the registration priority that overrides the priority inherited from the shared table support object (if not equal zero).Methods inherited from class org.snmp4j.agent.mo.DefaultMOTable
addMOChangeListener, addMOTableRowListener, addNewRow, addPendingChanges, addRow, addRowInternal, cleanup, commit, covers, createRow, createRow, createRowInternal, exportInstance, find, findCell, fireAfterMOChange, fireAfterPrepareMOChange, fireBeforeMOChange, fireBeforePrepareMOChange, fireRowChanged, fireRowExistsEvent, get, getCellInfo, getCellOID, getChangesFromRequest, getColumn, getColumnCount, getColumnIndex, getColumns, getDefaultValues, getDependentTableRow, getID, getIndexDef, getIndexPart, getInstanceSubID, getLowerBound, getModel, getNewRows, getOID, getPendingChangeSet, getPersistentValues, getRowModificationControlColumns, getRowPreview, getScope, getUpperBound, getValue, getValue, getValue, getValue, hasNewRows, importInstance, instanceCount, instanceIterator, isChangeSetComplete, isConfigurable, isCovered, isLowerIncluded, isOverlapping, isUpperIncluded, isVolatile, isVolatile, load, loadRow, next, next, prepare, removeAll, removeAnyStorageType, removeAnyStorageType, removeMOChangeListener, removeMOTableRowListener, removeRow, restoreRawDataForHiddenColumns, save, setConfigurable, setModel, setValue, setVolatile, toString, undo, update, updateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.snmp4j.agent.mo.ChangeableManagedObject
addMOChangeListener, removeMOChangeListenerMethods inherited from interface org.snmp4j.agent.ManagedObject
cleanup, commit, find, get, getScope, next, next, prepare, undoMethods inherited from interface org.snmp4j.agent.ManagedObjectValueAccess
setValueMethods inherited from interface org.snmp4j.agent.MOScope
isEmptyMethods inherited from interface org.snmp4j.agent.mo.MOTable
addMOTableRowListener, addNewRow, addRow, createRow, createRow, find, getCellInfo, getColumn, getColumnCount, getColumnIndex, getColumns, getDefaultValues, getIndexDef, getIndexPart, getModel, getOID, getValue, getValue, removeMOTableRowListener, removeRow
-
Constructor Details
-
DefaultAgentXSharedMOTable
public DefaultAgentXSharedMOTable(org.snmp4j.smi.OID oid, org.snmp4j.agent.mo.MOTableIndex indexDef, C[] columns) Creates a new shared table with the specified "Entry" OID, INDEX, columns, and aDefaultMOMutableTableModelas table model.- Parameters:
oid- the OID of the SNMP table's Entry object. If the table is ifTable (1.3.6.1.2.1.2.2) then the OID to provide is 1.3.6.1.2.1.2.2.1 which is the ifEntry OID. By SMI rule, you can simply append ".1" to the table OID.indexDef- the index definition of the table based on the INDEX clause of the table MIB definition.columns- the column definitions which may also include non-accessible columns.
-
DefaultAgentXSharedMOTable
public DefaultAgentXSharedMOTable(org.snmp4j.smi.OID oid, org.snmp4j.agent.mo.MOTableIndex indexDef, C[] columns, M model) Creates a new shared table with the specified "Entry" OID, INDEX, columns, and aDefaultMOMutableTableModelas table model.- Parameters:
oid- the OID of the SNMP table's Entry object. If the table is ifTable (1.3.6.1.2.1.2.2) then the OID to provide is 1.3.6.1.2.1.2.2.1 which is the ifEntry OID. By SMI rule, you can simply append ".1" to the table OID.indexDef- the index definition of the table based on the INDEX clause of the table MIB definition.columns- the column definitions which may also include non-accessible columns.model- the table model to be used by the shared table.
-
-
Method Details
-
getOverrideIndexAllocationMode
public byte getOverrideIndexAllocationMode()Gets the index allocation mode that overrides the allocation mode inherited from the shared table support for index allocation operations for this shared table.- Returns:
- 0 if there is no overriding and the overridden mode otherwise.
-
getOverridePriority
public byte getOverridePriority()Gets the index priority that overrides the priority inherited from the shared table support for index allocation operations for this shared table.- Returns:
- 0 if there is no overriding and the overridden priority otherwise.
-
setOverrideIndexAllocationMode
public void setOverrideIndexAllocationMode(byte overrideIndexAllocationMode) Sets the index allocation mode that overrides the allocation mode inherited from the shared table support for index allocation operations for this shared table.- Parameters:
overrideIndexAllocationMode- an index allocation mode as defined byAgentXSharedMOTableSupportor zero to use the default priority.
-
setOverridePriority
public void setOverridePriority(byte overridePriority) Sets the registration priority that overrides the priority inherited from the shared table support object (if not equal zero).- Parameters:
overridePriority- a value between 1 and 255 (-1 respectively - its a byte) or zero which indicates that the default priority should be used.
-
changeRowIndex
public boolean changeRowIndex(org.snmp4j.smi.OID oldIndex, org.snmp4j.smi.OID newIndex) Change the row index of a row in this shared table and trigger index allocation updates indirectly by firing a newMOTableRowEvent.UPDATEDevent.- Specified by:
changeRowIndexin interfaceAgentXSharedMutableMOTable<R extends org.snmp4j.agent.mo.MOTableRow, C extends org.snmp4j.agent.mo.MOColumn, M extends org.snmp4j.agent.mo.MOTableModel<R>>- Parameters:
oldIndex- the old index of the row to change.newIndex- the new index of the row.- Returns:
trueif the row index has been changed,falseotherwise.