java.lang.Object | |
↳ | com.sun.jmx.snmp.agent.SnmpGenericObjectServer |
This class is a utility class that transforms SNMP GET / SET requests into standard JMX getAttributes() setAttributes() requests.
The transformation relies on the metadata information provided by the
SnmpGenericMetaServer
object which is
passed as the first parameter to every method. This SnmpGenericMetaServer
object is usually a Metadata object generated by mibgen
.
This class is used internally by mibgen generated metadata objects and you should never need to use it directly.
This API is a Sun Microsystems internal API and is subject to change without notice.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
server | The MBean server through which the MBeans will be accessed. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds a new SnmpGenericObjectServer.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checks whether a SET operation can be performed on a given SNMP
variable.
| |||||||||||
Checks whether an SNMP SET request can be successfully performed.
| |||||||||||
Execute an SNMP GET request.
| |||||||||||
Get the value of an SNMP variable.
| |||||||||||
Set the value of an SNMP variable.
| |||||||||||
Execute an SNMP SET request.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Builds a new SnmpGenericObjectServer. Usually there will be a single object of this type per MIB.
server | The MBeanServer in which the MBean accessed by this MIB are registered. |
---|
Checks whether a SET operation can be performed on a given SNMP variable.
meta | The impacted metadata object |
---|---|
name | The ObjectName of the impacted MBean |
x | The new requested SnmpValue |
id | The OID arc identifying the variable we're trying to set. |
data | User contextual data allocated through the
SnmpUserDataFactory
This method calls checkSetAccess() on the meta object, and then tries to invoke the checkAttributeName() method on the MBean. If this method is not defined then it is assumed that the SET won't fail.
This method is called internally by |
SnmpStatusException | if the requested SET operation must
be rejected. Raising an exception will abort the request. Exceptions should never be raised directly, but only by means of
req.registerCheckException(VariableId,SnmpStatusException)
|
---|
Checks whether an SNMP SET request can be successfully performed.
For each variable in the subrequest, this method calls checkSetAccess() on the meta object, and then tries to invoke the checkAttributeName() method on the MBean. If this method is not defined then it is assumed that the SET won't fail.
This method is called internally by mibgen
generated
objects and you should never need to call it directly.
meta | The metadata object impacted by the subrequest |
---|---|
name | The ObjectName of the MBean impacted by this subrequest |
req | The SNMP subrequest to execute on the MBean |
depth | The depth of the SNMP object in the OID tree. |
SnmpStatusException | if the requested SET operation must
be rejected. Raising an exception will abort the request. Exceptions should never be raised directly, but only by means of
req.registerCheckException(VariableId,SnmpStatusException)
|
---|
Execute an SNMP GET request.
This method first builds the list of attributes that need to be retrieved from the MBean and then calls getAttributes() on the MBean server. Then it updates the SnmpMibSubRequest with the values retrieved from the MBean.
The SNMP metadata information is obtained through the given
meta
object, which usually is an instance of a
mibgen
generated class.
This method is called internally by mibgen
generated
objects and you should never need to call it directly.
meta | The metadata object impacted by the subrequest |
---|---|
name | The ObjectName of the MBean impacted by this subrequest |
req | The SNMP subrequest to execute on the MBean |
depth | The depth of the SNMP object in the OID tree. |
SnmpStatusException | whenever an SNMP exception must be
raised. Raising an exception will abort the request. Exceptions should never be raised directly, but only by means of
req.registerGetException(VariableId,SnmpStatusException)
|
---|
Get the value of an SNMP variable.
You should never need to use this method directly.
meta | The impacted metadata object |
---|---|
name | The ObjectName of the impacted MBean |
id | The OID arc identifying the variable we're trying to set. |
data | User contextual data allocated through the
SnmpUserDataFactory |
SnmpStatusException | whenever an SNMP exception must be
raised. Raising an exception will abort the request. Exceptions should never be raised directly, but only by means of
req.registerGetException(VariableId,SnmpStatusException)
|
---|
SnmpStatusException |
---|
Set the value of an SNMP variable.
You should never need to use this method directly.
meta | The impacted metadata object |
---|---|
name | The ObjectName of the impacted MBean |
x | The new requested SnmpValue |
id | The OID arc identifying the variable we're trying to set. |
data | User contextual data allocated through the
SnmpUserDataFactory |
SnmpStatusException | whenever an SNMP exception must be
raised. Raising an exception will abort the request. Exceptions should never be raised directly, but only by means of
req.registerSetException(VariableId,SnmpStatusException)
|
---|
Execute an SNMP SET request.
This method first builds the list of attributes that need to be set on the MBean and then calls setAttributes() on the MBean server. Then it updates the SnmpMibSubRequest with the new values retrieved from the MBean.
The SNMP metadata information is obtained through the given
meta
object, which usually is an instance of a
mibgen
generated class.
This method is called internally by mibgen
generated
objects and you should never need to call it directly.
meta | The metadata object impacted by the subrequest |
---|---|
name | The ObjectName of the MBean impacted by this subrequest |
req | The SNMP subrequest to execute on the MBean |
depth | The depth of the SNMP object in the OID tree. |
SnmpStatusException | whenever an SNMP exception must be
raised. Raising an exception will abort the request. Exceptions should never be raised directly, but only by means of
req.registerGetException(VariableId,SnmpStatusException)
|
---|