FileDocCategorySizeDatePackage
SnmpGenericMetaServer.javaAPI DocJava SE 5 API4175Fri Aug 26 14:55:04 BST 2005com.sun.jmx.snmp.agent

SnmpGenericMetaServer

public interface SnmpGenericMetaServer

This interface defines the methods that must be implemented by an SNMP metadata object that needs to interact with an {@link com.sun.jmx.snmp.agent.SnmpGenericObjectServer} object.

All these methods are usually generated by mibgen when run in generic-metadata mode.

This interface is used internally between the generated Metadata and the SNMP runtime and you shouldn't need to worry about it, because you will never have to use it directly.

This API is a Sun Microsystems internal API and is subject to change without notice.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.ObjectbuildAttributeValue(long id, com.sun.jmx.snmp.SnmpValue value)
Construct an attribute value (as returned by Attribute::getValue()) from an SnmpValue. The returned attribute value can be used to construct an Attribute object.

param
id The OID arc identifying the variable for which the value is constructed.
param
value The SnmpValue from which the Attribute::value will be constructed.
return
The attribute value built from the given value.
exception
SnmpStatusException if the attribute value cannot be built from the given SnmpValue value.

public com.sun.jmx.snmp.SnmpValuebuildSnmpValue(long id, java.lang.Object value)
Construct an SnmpValue from an Attribute value as returned by Attribute::getValue().

param
id The OID arc identifying the variable for which the value is constructed.
param
value The attribute value as returned by Attribute::getValue().
return
The SnmpValue built from the given value.
exception
SnmpStatusException if the SnmpValue cannot be built from the given value.

public voidcheckGetAccess(long id, java.lang.Object data)
Check the access rights for a GET operation.

param
id The OID arc identifying the variable for which the SET is requested.
param
data A contextual object containing user-data. This object is allocated through the {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory} for each incoming SNMP request.
exception
SnmpStatusException if the SET operation must be rejected.

public voidcheckSetAccess(com.sun.jmx.snmp.SnmpValue x, long id, java.lang.Object data)
Check the access rights for a SET operation.

param
x The new requested value.
param
id The OID arc identifying the variable for which the SET is requested.
param
data A contextual object containing user-data. This object is allocated through the {@link com.sun.jmx.snmp.agent.SnmpUserDataFactory} for each incoming SNMP request.
exception
SnmpStatusException if the SET operation must be rejected.

public java.lang.StringgetAttributeName(long id)
Return the name of the attribute corresponding to the SNMP variable identified by the given id.

param
id The OID arc identifying the variable.
return
The name of the variable identified by the given id.
exception
SnmpStatusException if the given id does not correspond to a known variable.