java.lang.Object | ||
↳ | com.sun.jmx.snmp.agent.SnmpMibNode | |
↳ | com.sun.jmx.snmp.agent.SnmpMibTable |
![]() |
![]() |
This class is the base class for SNMP table metadata.
Its responsibility is to manage a sorted array of OID indexes
according to the SNMP indexing scheme over the "real" table.
Each object of this class can be bound to an
SnmpTableEntryFactory
to which it will
forward remote entry creation requests, and invoke callbacks
when an entry has been successfully added to / removed from
the OID index array.
For each table defined in the MIB, mibgen will generate a specific
class called TableTableName that will implement the
SnmpTableEntryFactory interface, and a corresponding
TableNameMeta class that will extend this class.
The TableTableName class corresponds to the MBean view of the
table while the TableNameMeta class corresponds to the
MIB metadata view of the same table.
Objects of this class are instantiated by the generated
whole MIB class extending SnmpMib
You should never need to instantiate this class directly.
This API is a Sun Microsystems internal API and is subject to change without notice.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
creationEnabled | true if remote creation of entries via SET operations
is enabled. |
||||||||||
factory | The entry factory | ||||||||||
nodeId | The id of the contained entry object. | ||||||||||
theMib | The MIB to which the metadata is linked. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new
SnmpMibTable metadata node. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a new entry in this
SnmpMibTable . | |||||||||||
Add a new entry in this
SnmpMibTable . | |||||||||||
Enable to add an SNMP entry listener to this
SnmpMibTable . | |||||||||||
Generic handling of the
check operation. | |||||||||||
This method is invoked when the creation of a new entry is requested
by a remote SNMP manager.
| |||||||||||
Generic handling of the
get operation. | |||||||||||
Return the entries stored in this table
SnmpMibTable . | |||||||||||
Get the entry corresponding to the specified rowOid.
| |||||||||||
Get the ObjectName of the entry corresponding to the
specified rowOid.
| |||||||||||
Return a
NotificationInfo object containing the
notification class and the notification type sent by the
SnmpMibTable . | |||||||||||
Get the size of the table.
| |||||||||||
Return
true if the conceptual row contains a columnar
object used to control creation/deletion of rows in this table. | |||||||||||
Tell whether a new entry should be created when a SET operation
is received for an entry that does not exist yet.
| |||||||||||
Tell whether the specific version of this metadata generated
by
mibgen requires entries to be registered with
the MBeanServer. | |||||||||||
Register the factory through which table entries should
be created when remote entry creation is enabled.
| |||||||||||
Remove the specified entry from the table.
| |||||||||||
Remove the specified entry from the table.
| |||||||||||
Remove the specified entry from the table.
| |||||||||||
Enable to remove an SNMP entry listener from this
SnmpMibTable . | |||||||||||
Generic handling of the
set operation. | |||||||||||
This method lets you dynamically switch the creation policy.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method takes care of initial RowStatus handling during the
check() phase of a SET request.
| |||||||||||
This method is used internally and is implemented by the
SnmpMibTable subclasses generated by mibgen . | |||||||||||
Check whether the specified row can be removed from the table.
| |||||||||||
Check whether the control variable of the given row can be
switched to the new specified
newStatus . | |||||||||||
Return true if the entry identified by the given OID index
is contained in this table.
| |||||||||||
This method takes care of final RowStatus handling during the
set() phase of a SET request.
| |||||||||||
This method is used internally and is implemented by the
SnmpMibTable subclasses generated by mibgen . | |||||||||||
Return the first entry OID registered in the table.
| |||||||||||
Get the
SnmpOid index of the row that follows
the given oid in the table. | |||||||||||
This method is used internally and is implemented by the
SnmpMibTable subclasses generated by mibgen . | |||||||||||
Return the next OID arc corresponding to a readable columnar
object in the underlying entry OBJECT-TYPE, possibly skipping over
those objects that must not or cannot be returned.
| |||||||||||
Return the RowStatus code value specified in this request.
| |||||||||||
This method is used internally and is implemented by the
SnmpMibTable subclasses generated by mibgen . | |||||||||||
Tell whether the specified row is ready and can be put in the
notInService state.
| |||||||||||
Return true if the columnar object identified by
var
is used to control the addition/deletion of rows in this table. | |||||||||||
Map the value of the
vbstatus varbind to the
corresponding RowStatus code defined in
EnumRowStatus . | |||||||||||
Remove a table row upon a remote manager request.
| |||||||||||
This method is used internally and is implemented by the
SnmpMibTable subclasses generated by mibgen . | |||||||||||
Set the control variable to the specified
newStatus
value. | |||||||||||
Hook for subclasses.
| |||||||||||
This method is used internally and is implemented by the
SnmpMibTable subclasses generated by mibgen . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
true
if remote creation of entries via SET operations
is enabled.
[default value is false
]
The id of the contained entry object.
Create a new SnmpMibTable
metadata node.
mib | The SNMP MIB to which the metadata will be linked. |
---|
Add a new entry in this SnmpMibTable
.
Also triggers the addEntryCB() callback of the
SnmpTableEntryFactory
interface
if this node is bound to a factory.
This method assumes that the given entry will not be registered.
If the entry is going to be registered, or if ObjectName's are
required, then
addEntry(SnmpOid, ObjectName, Object)
should be prefered.
This function is mainly provided for backward compatibility.
rowOid | The SnmpOid identifying the table
row to be added. |
---|---|
entry | The entry to add. |
SnmpStatusException | The entry couldn't be added
at the position identified by the given
rowOid , or this version of the metadata
requires ObjectName's.
|
---|
Add a new entry in this SnmpMibTable
.
Also triggers the addEntryCB() callback of the
SnmpTableEntryFactory
interface
if this node is bound to a factory.
oid | The SnmpOid identifying the table
row to be added. |
---|---|
name | The ObjectName with which this entry is registered. This parameter can be omitted if isRegistrationRequired() return false. |
entry | The entry to add. |
SnmpStatusException | The entry couldn't be added
at the position identified by the given
rowOid , or if this version of the metadata
requires ObjectName's, and the given name is null.
|
---|
Enable to add an SNMP entry listener to this
SnmpMibTable
.
listener | The listener object which will handle the notifications emitted by the registered MBean. |
---|---|
filter | The filter object. If filter is null, no filtering will be performed before handling notifications. |
handback | The context to be sent to the listener when a notification is emitted. |
IllegalArgumentException | Listener parameter is null. |
---|
Generic handling of the check
operation.
The default implementation of this method is to
check(req,oid,depth+1)
method.
public void check(SnmpMibSubRequest req, int depth) throws SnmpStatusException { final SnmpOid oid = req.getEntryOid(); final int action = getRowAction(req,oid,depth+1); beginRowAction(req,oid,depth+1,action); check(req,oid,depth+1); }
You should not need to override this method in any cases, because
it will eventually call
check(SnmpMibSubRequest req, int depth)
on the generated
derivative of SnmpMibEntry
. If you need to implement
specific policies for minimizing the accesses made to some remote
underlying resources, or if you need to implement some consistency
checks between the different values provided in the varbind list,
you should then rather override
check(SnmpMibSubRequest req, int depth)
on the generated
derivative of SnmpMibEntry
.
req | The sub-request that must be handled by this node. |
---|---|
depth | The depth reached in the OID tree. |
SnmpStatusException |
---|
This method is invoked when the creation of a new entry is requested
by a remote SNMP manager.
By default, remote entry creation is disabled - and this method
will not be called. You can dynamically switch the entry creation
policy by calling setCreationEnabled(true)
and
setCreationEnabled(false)
on this object.
This method is called internally by the SNMP runtime and you should never need to call it directly. However you might want to extend it in order to implement your own specific application behaviour, should the default behaviour not be at your convenience.
req | The SNMP subrequest requesting this creation |
---|---|
rowOid | The OID indexing the conceptual row (entry) for which the creation was requested. |
depth | The position of the columnar object arc in the OIDs from the varbind list. |
SnmpStatusException | if the entry cannot be created. |
---|
Generic handling of the get
operation.
The default implementation of this method is to
get(req,oid,depth+1)
method.
public void get(SnmpMibSubRequest req, int depth) throws SnmpStatusException { boolean isnew = req.isNewEntry(); // if the entry does not exists, then registers an error for // each varbind involved (nb: this should not happen, since // the error should already have been detected earlier) // if (isnew) { SnmpVarBind var = null; for (Enumeration e= req.getElements(); e.hasMoreElements();) { var = (SnmpVarBind) e.nextElement(); req.registerGetException(var,noSuchNameException); } } final SnmpOid oid = req.getEntryOid(); get(req,oid,depth+1); }
You should not need to override this method in any cases, because
it will eventually call
get(SnmpMibSubRequest req, int depth)
on the generated
derivative of SnmpMibEntry
. If you need to implement
specific policies for minimizing the accesses made to some remote
underlying resources, or if you need to implement some consistency
checks between the different values provided in the varbind list,
you should then rather override
get(SnmpMibSubRequest req, int depth)
on the generated
derivative of SnmpMibEntry
.
req | The sub-request that must be handled by this node. |
---|---|
depth | The depth reached in the OID tree. |
SnmpStatusException |
---|
Return the entries stored in this table SnmpMibTable
.
If the subclass generated by mibgen uses the generic way to access
the entries (i.e. if it goes through the MBeanServer) then some of
the entries may be null
. It all depends whether a non
null
entry was passed to addEntry().
Otherwise, if it uses the standard way (access the entry directly
through their standard MBean interface) this array will contain all
the entries.
Get the entry corresponding to the specified rowOid.
rowOid | The SnmpOid identifying the
row to be retrieved. |
---|
SnmpStatusException | There is no entry with the specified
rowOid in the table.
|
---|
Get the ObjectName of the entry corresponding to the specified rowOid. The result of this method is only meaningful if isRegistrationRequired() yields true.
rowOid | The SnmpOid identifying the table
row whose ObjectName we want to retrieve. |
---|
SnmpStatusException | There is no entry with the specified
rowOid in the table.
|
---|
Return a NotificationInfo
object containing the
notification class and the notification type sent by the
SnmpMibTable
.
Get the size of the table.
Return true
if the conceptual row contains a columnar
object used to control creation/deletion of rows in this table.
This columnar object can be either a variable with RowStatus syntax as defined by RFC 2579, or a plain variable whose semantics is table specific.
By default, this function returns false
, and it is
assumed that the table has no such control variable.
When mibgen
is used over SMIv2 MIBs, it will generate
an hasRowStatus()
method returning true
for each table containing an object with RowStatus syntax.
When this method returns false
the default mechanism
for remote entry creation is used.
Otherwise, creation/deletion is performed as specified
by the control variable (see getRowAction() for more details).
This method is called internally when a SET request involving this table is processed.
If you need to implement a control variable which do not use
the RowStatus convention as defined by RFC 2579, you should
subclass the generated table metadata class in order to redefine
this method and make it returns true
.
You will then have to redefine the isRowStatus(), mapRowStatus(),
isRowReady(), and setRowStatus() methods to suit your specific
implementation.
true
if this table contains a control
variable (eg: a variable with RFC 2579 RowStatus syntax),
false
if this table does not contain
any control variable.Tell whether a new entry should be created when a SET operation is received for an entry that does not exist yet.
false
]
Tell whether the specific version of this metadata generated
by mibgen
requires entries to be registered with
the MBeanServer. In this case an ObjectName will have to be
passed to addEntry() in order for the table to behave correctly
(case of the generic metadata).
If that version of the metadata does not require entry to be registered, then passing an ObjectName becomes optional (null can be passed instead).
true
if registration is required by this
version of the metadata.
Register the factory through which table entries should be created when remote entry creation is enabled.
factory | The
SnmpTableEntryFactory through
which entries will be created when a remote SNMP manager
request the creation of a new entry via an SNMP SET request.
|
---|
Remove the specified entry from the table.
Also triggers the removeEntryCB() callback of the
SnmpTableEntryFactory
interface
if this node is bound to a factory.
rowOid | The SnmpOid identifying the table
row to remove. |
---|---|
entry | The entry to be removed. This parameter is not used internally, it is simply passed along to the removeEntryCB() callback. |
SnmpStatusException | if the specified entry couldn't
be removed (if the given rowOid is not
valid for instance).
|
---|
Remove the specified entry from the table.
Also triggers the removeEntryCB() callback of the
SnmpTableEntryFactory
interface
if this node is bound to a factory.
rowOid | The SnmpOid identifying the table
row to remove. |
---|
SnmpStatusException | if the specified entry couldn't
be removed (if the given rowOid is not
valid for instance).
|
---|
Remove the specified entry from the table.
Also triggers the removeEntryCB() callback of the
SnmpTableEntryFactory
interface
if this node is bound to a factory.
pos | The position of the entry in the table. |
---|---|
entry | The entry to be removed. This parameter is not used internally, it is simply passed along to the removeEntryCB() callback. |
SnmpStatusException | if the specified entry couldn't be removed. |
---|
Enable to remove an SNMP entry listener from this
SnmpMibTable
.
listener | The listener object which will handle the notifications emitted by the registered MBean. This method will remove all the information related to this listener. |
---|
ListenerNotFoundException | The listener is not registered in the MBean. |
---|
Generic handling of the set
operation.
The default implementation of this method is to
call the generated
set(req,oid,depth+1)
method.
public void set(SnmpMibSubRequest req, int depth) throws SnmpStatusException { final SnmpOid oid = req.getEntryOid(); final int action = getRowAction(req,oid,depth+1); set(req,oid,depth+1); endRowAction(req,oid,depth+1,action); }
You should not need to override this method in any cases, because
it will eventually call
set(SnmpMibSubRequest req, int depth)
on the generated
derivative of SnmpMibEntry
. If you need to implement
specific policies for minimizing the accesses made to some remote
underlying resources, or if you need to implement some consistency
checks between the different values provided in the varbind list,
you should then rather override
set(SnmpMibSubRequest req, int depth)
on the generated
derivative of SnmpMibEntry
.
req | The sub-request that must be handled by this node. |
---|---|
depth | The depth reached in the OID tree. |
SnmpStatusException |
---|
This method lets you dynamically switch the creation policy.
remoteCreationFlag | Tells whether remote entry creation must
be enabled or disabled.
By default remote entry creation via SET operation is disabled. |
---|
This method takes care of initial RowStatus handling during the check() phase of a SET request. In particular it will:
rowAction
returned by
getRowAction()
is valid.rowAction
specified it will:
createNewEntry()
(
rowAction = createAndGo or createAndWait
),checkRemoveTableRow()
(
rowAction = destroy
),checkRowStatusChange()
(
rowAction = active or notInService
),
rowAction
is not correct.In principle, you should not need to redefine this method.
beginRowAction()
is called during the check phase
of a SET request, before actual checking on the varbind list
is performed.
req | The sub-request that must be handled by this node. |
---|---|
rowOid | The SnmpOid identifying the table
row involved in the operation. |
depth | The depth reached in the OID tree. |
rowAction | The requested action as returned by
getRowAction() : one of the RowStatus codes defined in
EnumRowStatus . These codes
correspond to RowStatus codes as defined in RFC 2579,
plus the unspecified value which is SNMP Runtime specific. |
SnmpStatusException | if the specified rowAction
is not valid or cannot be executed.
This should not happen since it would break the
atomicity of the SET request. Specific checks should
be implemented in beginRowAction() if needed. |
---|
This method is used internally and is implemented by the
SnmpMibTable
subclasses generated by mibgen
.
SnmpStatusException |
---|
Check whether the specified row can be removed from the table.
This method is called during the check phase of a SET request when the control variable specifies destroy
By default it is assumed that nothing prevents row deletion and this method does nothing. It is simply provided as a hook so that specific checks can be implemented.
Note that if the actual row deletion fails afterward, the atomicity of the request is no longer guaranteed.
req | The sub-request that must be handled by this node. |
---|---|
rowOid | The SnmpOid identifying the table
row involved in the operation. |
depth | The depth reached in the OID tree. |
SnmpStatusException | if the row deletion must be rejected. |
---|
Check whether the control variable of the given row can be
switched to the new specified newStatus
.
This method is called during the check phase of a SET request when the control variable specifies active or notInService.
By default it is assumed that nothing prevents putting the row in the requested state, and this method does nothing. It is simply provided as a hook so that specific checks can be implemented.
Note that if the actual row deletion fails afterward, the atomicity of the request is no longer guaranteed.
req | The sub-request that must be handled by this node. |
---|---|
rowOid | The SnmpOid identifying the table
row involved in the operation. |
depth | The depth reached in the OID tree. |
newStatus | The new status for the row: one of the
RowStatus code defined in
EnumRowStatus . These codes
correspond to RowStatus codes as defined in RFC 2579,
plus the unspecified value which is SNMP Runtime specific. |
SnmpStatusException | if switching to this new state would fail. |
---|
Return true if the entry identified by the given OID index is contained in this table.
Do not call this method directly.
This method is provided has a hook for subclasses. It is called when a get/set request is received in order to determine whether the specified entry is contained in the table. You may want to override this method if you need to perform e.g. lazy evaluation of tables (you need to update the table when a request is received) or if your table is virtual.
Note that this method is called by the Runtime from within a synchronized block.
oid | The index part of the OID we're looking for. |
---|---|
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
true
if the entry is found, false
otherwise.This method takes care of final RowStatus handling during the set() phase of a SET request. In particular it will:
setRowStatus(active)
( rowAction = createAndGo or active
),setRowStatus(notInService or
notReady)
depending on the result of
isRowReady()
(rowAction = createAndWait
),setRowStatus(notInService)
( rowAction = notInService
),
removeTableRow()
(
rowAction = destroy
),
rowAction
is not correct. This should be avoided
since it would break SET request atomicityIn principle, you should not need to redefine this method.
endRowAction()
is called during the set() phase
of a SET request, after the actual set() on the varbind list
has been performed. The varbind containing the control variable
is updated with the value returned by setRowStatus() (if it is
not null
).
req | The sub-request that must be handled by this node. |
---|---|
rowOid | The SnmpOid identifying the table
row involved in the operation. |
depth | The depth reached in the OID tree. |
rowAction | The requested action as returned by
getRowAction() : one of the RowStatus codes defined in
EnumRowStatus . These codes
correspond to RowStatus codes as defined in RFC 2579,
plus the unspecified value which is SNMP Runtime specific. |
SnmpStatusException | if the specified rowAction
is not valid. |
---|
This method is used internally and is implemented by the
SnmpMibTable
subclasses generated by mibgen
.
SnmpStatusException |
---|
Return the first entry OID registered in the table.
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
---|
SnmpOid
of the first entry in the table.SnmpStatusException | If the table is empty. |
---|
Get the SnmpOid
index of the row that follows
the given oid
in the table. The given
oid
does not need to be a valid row OID index.
oid | The OID from which the search will begin. |
---|---|
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
SnmpOid
index.SnmpStatusException | There is no index following the
specified oid in the table.
|
---|
This method is used internally and is implemented by the
SnmpMibTable
subclasses generated by mibgen
.
Return the next OID arc corresponding to a readable columnar object in the underlying entry OBJECT-TYPE.
rowOid | The OID index of the row involved in the operation. |
---|---|
var | Id of the variable we start from, looking for the next. |
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
SnmpStatusException | If no id is found after the given id. |
---|
Return the next OID arc corresponding to a readable columnar
object in the underlying entry OBJECT-TYPE, possibly skipping over
those objects that must not or cannot be returned.
Calls getNextVarEntryId(com.sun.jmx.snmp.SnmpOid, long, java.lang.Object)
,
until
skipEntryVariable(com.sun.jmx.snmp.SnmpOid, long, java.lang.Object, int)
returns false.
rowOid | The OID index of the row involved in the operation. |
---|---|
var | Id of the variable we start from, looking for the next. |
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
pduVersion | Protocol version of the original request PDU. |
SnmpStatusException | If no id is found after the given id. |
---|
Return the RowStatus code value specified in this request.
The RowStatus code value should be one of the values defined
by EnumRowStatus
. These codes correspond
to RowStatus codes as defined in RFC 2579, plus the unspecified
value which is SNMP Runtime specific.
req | The sub-request that must be handled by this node. |
---|---|
rowOid | The SnmpOid identifying the table
row involved in the operation. |
depth | The depth reached in the OID tree. |
SnmpStatusException | if the value of the control variable could not be mapped to a RowStatus code. |
---|
This method is used internally and is implemented by the
SnmpMibTable
subclasses generated by mibgen
.
rowOid | The OID index of the row involved in the operation. |
---|---|
var | The OID arc. |
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
SnmpStatusException | If this id is not valid. |
---|
Tell whether the specified row is ready and can be put in the notInService state.
This method is called only once, after all the varbind have been set on a new entry for which createAndWait was specified.
If the entry is not yet ready, this method should return false.
It will then be the responsibility of the entry to switch its
own state to notInService when it becomes ready.
No further call to isRowReady()
will be made.
By default, this method always return true.
mibgen
will not generate any specific implementation
for this method - meaning that by default, a row created using
createAndWait will always be placed in notInService
state at the end of the request.
If this table was defined using SMIv2, and if it contains a
control variable with RowStatus syntax, mibgen
will generate an implementation for this method that will
delegate the work to the metadata class modelling the conceptual
row, so that you can override the default behaviour by subclassing
that metadata class.
You will have to redefine this method if this default mechanism does not suit your needs.
rowOid | The SnmpOid identifying the table
row involved in the operation. |
---|---|
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
true
if the row can be placed in
notInService state.SnmpStatusException | An error occured while trying to retrieve the row status, and the operation should be aborted. |
---|
Return true if the columnar object identified by var
is used to control the addition/deletion of rows in this table.
By default, this method assumes that there is no control variable
and always return false
If this table was defined using SMIv2, and if it contains a
control variable with RowStatus syntax, mibgen
will generate a non default implementation for this method
that will identify the RowStatus control variable.
You will have to redefine this method if you need to implement control variables that do not conform to RFC 2579 RowStatus TEXTUAL-CONVENTION.
rowOid | The SnmpOid identifying the table
row involved in the operation. |
---|---|
var | The OID arc identifying the involved columnar object. |
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request.
|
Map the value of the vbstatus
varbind to the
corresponding RowStatus code defined in
EnumRowStatus
.
These codes correspond to RowStatus codes as defined in RFC 2579,
plus the unspecified value which is SNMP Runtime specific.
By default, this method assumes that the control variable is an Integer, and it simply returns its value without further analysis.
If this table was defined using SMIv2, and if it contains a
control variable with RowStatus syntax, mibgen
will generate a non default implementation for this method.
You will have to redefine this method if you need to implement control variables that do not conform to RFC 2579 RowStatus TEXTUAL-CONVENTION.
rowOid | The SnmpOid identifying the table
row involved in the operation. |
---|---|
vbstatus | The SnmpVarBind containing the value of the control variable, as identified by the isRowStatus() method. |
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
vbstatus
.SnmpStatusException | if the value of the control variable could not be mapped to a RowStatus code. |
---|
Remove a table row upon a remote manager request.
This method is called internally when getRowAction()
yields destroy - i.e.: it is only called when a remote
manager requests the removal of a table row.
You should never need to call this function directly.
By default, this method simply calls removeEntry(rowOid)
.
You can redefine this method if you need to implement some specific behaviour when a remote row deletion is invoked.
Note that specific checks should not be implemented in this
method, but rather in checkRemoveTableRow()
.
If checkRemoveTableRow()
succeeds and this method
fails afterward, the atomicity of the original SET request can no
longer be guaranteed.
req | The sub-request that must be handled by this node. |
---|---|
rowOid | The SnmpOid identifying the table
row involved in the operation. |
depth | The depth reached in the OID tree. |
SnmpStatusException | if the actual row deletion fails.
This should not happen since it would break the
atomicity of the SET request. Specific checks should
be implemented in checkRemoveTableRow()
if needed. If the entry does not exists, no exception
is generated and the method simply returns.
|
---|
This method is used internally and is implemented by the
SnmpMibTable
subclasses generated by mibgen
.
SnmpStatusException |
---|
Set the control variable to the specified newStatus
value.
This method maps the given newStatus
to the appropriate
value for the control variable, then sets the control variable in
the entry identified by rowOid
. It returns the new
value of the control variable.
By default, it is assumed that there is no control variable so this
method does nothing and simply returns null
.
If this table was defined using SMIv2, and if it contains a
control variable with RowStatus syntax, mibgen
will generate a non default implementation for this method.
You will have to redefine this method if you need to implement control variables that do not conform to RFC 2579 RowStatus TEXTUAL-CONVENTION.
rowOid | The SnmpOid identifying the table
row involved in the operation. |
---|---|
newStatus | The new status for the row: one of the
RowStatus code defined in
EnumRowStatus . These codes
correspond to RowStatus codes as defined in RFC 2579,
plus the unspecified value which is SNMP Runtime specific. |
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
new SnmpInt(newStatus)
) or null
if the table do not have any control variable.SnmpStatusException | If the given newStatus
could not be set on the specified entry, or if the
given newStatus is not valid. |
---|
Hook for subclasses. The default implementation of this method is to always return false. Subclasses should redefine this method so that it returns true when:
rowOid | The OID index of the row involved in the operation. |
---|---|
var | Id of the variable we start from, looking for the next. |
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
pduVersion | Protocol version of the original request PDU. |
This method is used internally and is implemented by the
SnmpMibTable
subclasses generated by mibgen
.
rowOid | The OID index of the row involved in the operation. |
---|---|
var | The var we want to validate. |
userData | A contextual object containing user-data.
This object is allocated through the
for each incoming SNMP request. |
SnmpStatusException | If this id is not valid. |
---|