public class FTable extends FValueNode
org.snmp4j.agent.mo.MOTable
persistLoaded
Constructor and Description |
---|
FTable(java.lang.String name,
org.snmp4j.agent.mo.MOTable moTable,
AgentWorker agent,
FColumn... column)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addGetListener(FTableGetListener l) |
FID |
addRow(FID id)
Adds row with specified row ID.
|
FID |
addRow(int... id)
Adds row with specified row ID.
|
FID |
addRowNext()
Row ID is generated by increasing the max first integer and
setting others (if exist) to 1.
|
void |
addSetListener(FTableSetListener l)
Registers the given observer to begin receiving "changed value" events
when changes are made to the managed object.
|
void |
addValidationListener(FTableValidationListener l)
Registers the given observer to begin receiving "validation" events
when changes are made to the managed object.
|
void |
deleteAll()
Deletes all rows.
|
FID |
deleteRow(FID idRow)
Deletes row from managed objects table.
|
void |
fireGetEvent()
Fires GET event
|
FColumn |
getColumn(int index) |
int |
getColumnCount()
Returns number of columns.
|
FColumn[] |
getColumns() |
ValueSyntax |
getColumnSyntax(FColumn c) |
ValueSyntax |
getColumnSyntax(int index) |
org.snmp4j.agent.mo.MOTable |
getMOTable()
Returns SNMP4J underlying managed object.
|
int |
getRowCount()
Returns rows count.
|
FID |
getRowID(int indexRow)
Finds row ID by row index.
|
int |
getRowIndex(FID idRow)
Finds row index specified by row ID.
|
java.lang.Object |
getValueAt(FID idRow,
FColumn col)
Gets the value of specified cell.
|
boolean |
isAccessibleForWrite() |
boolean |
isCellEditable(FID idRow,
FColumn col)
Checks the editable flag for the specified cell.
|
boolean |
isVolatile()
Returns volatile flag.
|
protected void |
loadPersistValue()
Loads persistent value into the scalar/table.
|
void |
removeGetListener(FTableGetListener l) |
void |
removeSetListener(FTableSetListener l)
Unregisters the given observer from the notification list so it will
no longer receive change updates.
|
void |
removeValidationListener(FTableValidationListener l)
Unregisters the given observer to stop receiving "validation" events
when changes are made to the managed object.
|
void |
setAgent(AgentWorker agent)
Sets the agent.
|
void |
setDefaultValues(java.lang.Object... obj)
Sets default cell values for a new row.
|
void |
setValueAt(java.lang.Object obj,
FID idRow,
FColumn col)
Sets the value for the specified cell.
|
protected void |
setVolatilePrivate(boolean volatileTable) |
addRestoreDefaultListener, fireRestoreDefaultEvent, isPersistLoaded, removeRestoreDefaultListener, setVolatile
getFID, getFIDtoString, getName, getOID, getOIDSize, getPersistStorage, makeFException, makeFException
public FTable(java.lang.String name, org.snmp4j.agent.mo.MOTable moTable, AgentWorker agent, FColumn... column)
name
- node name as it is declared in a MIB file.moTable
- table managed object.agent
- agent worker.column
- columns array.public void setAgent(AgentWorker agent)
FNode
protected void setVolatilePrivate(boolean volatileTable)
setVolatilePrivate
in class FValueNode
FValueNode.setVolatilePrivate(boolean)
public boolean isVolatile()
isVolatile
in class FValueNode
FValueNode.isVolatile()
public boolean isAccessibleForWrite()
public org.snmp4j.agent.mo.MOTable getMOTable()
org.snmp4j.agent.mo.MOTable
object this class
is representing.public int getRowCount()
public FID getRowID(int indexRow) throws FException
indexRow
- row index.FException
- wrong index.public int getRowIndex(FID idRow)
idRow
- row IDpublic FID addRowNext() throws FException
FException
- failure to add row.public FID addRow(int... id) throws FException
id
- list of row integer indices.FException
- failure to add row.public FID addRow(FID id) throws FException
id
- list of row integer indices.FException
- failure to add row.public FID deleteRow(FID idRow) throws FException
idRow
- row ID (not row index!) to delete from managed objects tableFException
- if the row cannot be found or cannot be removedpublic void deleteAll() throws FException
FException
- failure to delete rows.public int getColumnCount()
public FColumn[] getColumns()
public FColumn getColumn(int index)
public ValueSyntax getColumnSyntax(int index)
public ValueSyntax getColumnSyntax(FColumn c)
protected void loadPersistValue()
loadPersistValue
in class FValueNode
FValueNode.loadPersistValue()
public void setDefaultValues(java.lang.Object... obj) throws FException
obj
- comma separated list of values.FException
- object cannot be parsed.public boolean isCellEditable(FID idRow, FColumn col) throws FException
idRow
- the row index.col
- column.FException
- column is not valid.public java.lang.Object getValueAt(FID idRow, FColumn col) throws FException
idRow
- ID of the row (this is not an row index!)col
- columnFException
- for not valid idRow or column parameter.public void setValueAt(java.lang.Object obj, FID idRow, FColumn col) throws FException
obj
- new value, which is set to the cell.idRow
- ID of the row (this is not a row index!).col
- column.FException
- for not valid idRow or col parameter or
while object conversion.public void addGetListener(FTableGetListener l)
public void removeGetListener(FTableGetListener l)
public void addSetListener(FTableSetListener l)
l
- the observer to registerpublic void removeSetListener(FTableSetListener l)
l
- the observer to unregisterpublic void addValidationListener(FTableValidationListener l)
l
- the observer to registerpublic void removeValidationListener(FTableValidationListener l)
l
- the observer to registerpublic void fireGetEvent()