com.sun.jdmk.snmp.agent
Interface SnmpGenericMetaServer


Deprecated. Use package com.sun.management.snmp.agent in preference to classes in this package. This class may be removed in a future version of Java DMK.

public interface SnmpGenericMetaServer

This interface defines the methods that must be implemented by an SNMP metadata object that needs to interact with an 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.


Method Summary
 Object buildAttributeValue(long id, SnmpValue value)
          Deprecated. Construct an attribute value (as returned by Attribute::getValue()) from an SnmpValue.
 SnmpValue buildSnmpValue(long id, Object value)
          Deprecated. Construct an SnmpValue from an Attribute value as returned by Attribute::getValue().
 void checkGetAccess(long id, Object data)
          Deprecated. Check the access rights for a GET operation.
 void checkSetAccess(SnmpValue x, long id, Object data)
          Deprecated. Check the access rights for a SET operation.
 String getAttributeName(long id)
          Deprecated. Return the name of the attribute corresponding to the SNMP variable identified by the given id.
 

Method Detail

buildAttributeValue

public Object buildAttributeValue(long id,
                                  SnmpValue value)
                           throws SnmpStatusException
Deprecated. 
Construct an attribute value (as returned by Attribute::getValue()) from an SnmpValue. The returned attribute value can be used to construct an Attribute object.

Parameters:
id - The OID arc identifying the variable for which the value is constructed.
value - The SnmpValue from which the Attribute::value will be constructed.
Returns:
The attribute value built from the given value.
Throws:
SnmpStatusException - if the attribute value cannot be built from the given SnmpValue value.

buildSnmpValue

public SnmpValue buildSnmpValue(long id,
                                Object value)
                         throws SnmpStatusException
Deprecated. 
Construct an SnmpValue from an Attribute value as returned by Attribute::getValue().

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

getAttributeName

public String getAttributeName(long id)
                        throws SnmpStatusException
Deprecated. 
Return the name of the attribute corresponding to the SNMP variable identified by the given id.

Parameters:
id - The OID arc identifying the variable.
Returns:
The name of the variable identified by the given id.
Throws:
SnmpStatusException - if the given id does not correspond to a known variable.

checkSetAccess

public void checkSetAccess(SnmpValue x,
                           long id,
                           Object data)
                    throws SnmpStatusException
Deprecated. 
Check the access rights for a SET operation.

Parameters:
x - The new requested value.
id - The OID arc identifying the variable for which the SET is requested.
data - A contextual object containing user-data. This object is allocated through the SnmpUserDataFactory for each incoming SNMP request.
Throws:
SnmpStatusException - if the SET operation must be rejected.

checkGetAccess

public void checkGetAccess(long id,
                           Object data)
                    throws SnmpStatusException
Deprecated. 
Check the access rights for a GET operation.

Parameters:
id - The OID arc identifying the variable for which the SET is requested.
data - A contextual object containing user-data. This object is allocated through the SnmpUserDataFactory for each incoming SNMP request.
Throws:
SnmpStatusException - if the SET operation must be rejected.

FCS Release
jdmk-5_1-b34.1 2005.02.10_16:46:09_MET

Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.