public interface

SnmpMibRequest

com.sun.jmx.snmp.agent.SnmpMibRequest
Known Indirect Subclasses

Class Overview

This interface models the part of a SNMP request that involves a specific MIB. One object implementing this interface will be created for every MIB involved in a SNMP request, and that object will be passed to the SnmpMibAgent in charge of handling that MIB. Objects implementing this interface will be allocated by the SNMP engine. You will never need to implement this interface. You will only use it.

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

Summary

Public Methods
abstract void addVarBind(SnmpVarBind varbind)
Adds a varbind to this request sublist.
abstract byte[] getAccessContextName()
Gets the incoming request context name used by Access Control Model in order to allow or deny the access to OIDs.
abstract byte[] getContextName()
Gets the incoming request context name.
abstract Enumeration getElements()
Returns the list of varbind to be handled by the SNMP mib node.
abstract SnmpEngine getEngine()
Returns the local engine.
abstract SnmpPdu getPdu()
Returns the SNMP PDU attached to the request.
abstract String getPrincipal()
Gets the incoming request principal.
abstract int getRequestPduVersion()
Returns the SNMP protocol version of the original request.
abstract int getSecurityLevel()
Gets the incoming request security level.
abstract int getSecurityModel()
Gets the incoming request security model.
abstract int getSize()
Returns the number of elements (varbinds) in this request sublist.
abstract Vector<SnmpVarBind> getSubList()
Returns the vector of varbind to be handled by the SNMP mib node.
abstract Object getUserData()
Returns a handle on a user allocated contextual object.
abstract int getVarIndex(SnmpVarBind varbind)
Returns the varbind index that should be embedded in an SnmpStatusException for this particular varbind.
abstract int getVersion()
Returns the SNMP protocol version of the original request.

Public Methods

public abstract void addVarBind (SnmpVarBind varbind)

Adds a varbind to this request sublist. This method is used for internal purposes and you should never need to call it directly.

Parameters
varbind The varbind to be added in the sublist.

public abstract byte[] getAccessContextName ()

Gets the incoming request context name used by Access Control Model in order to allow or deny the access to OIDs. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise null is returned.

Returns
  • The checked context name.

public abstract byte[] getContextName ()

Gets the incoming request context name. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise null is returned.

Returns
  • The context name.

public abstract Enumeration getElements ()

Returns the list of varbind to be handled by the SNMP mib node.

Returns
  • The element of the enumeration are instances of com.sun.jmx.snmp.SnmpVarBind

public abstract SnmpEngine getEngine ()

Returns the local engine. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise null is returned.

Returns
  • the local engine.

public abstract SnmpPdu getPdu ()

Returns the SNMP PDU attached to the request.

Returns
  • The SNMP PDU.

public abstract String getPrincipal ()

Gets the incoming request principal. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise null is returned.

Returns
  • The request principal.

public abstract int getRequestPduVersion ()

Returns the SNMP protocol version of the original request. No translation is done on the version. The actual received request SNMP version is returned.

Returns
  • The SNMP protocol version of the original request.

public abstract int getSecurityLevel ()

Gets the incoming request security level. This level is defined in SnmpEngine. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise -1 is returned.

Returns
  • The security level.

public abstract int getSecurityModel ()

Gets the incoming request security model. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise -1 is returned.

Returns
  • The security model.

public abstract int getSize ()

Returns the number of elements (varbinds) in this request sublist.

Returns
  • The number of elements in the sublist.

public abstract Vector<SnmpVarBind> getSubList ()

Returns the vector of varbind to be handled by the SNMP mib node. The caller shall not modify this vector.

Returns
  • The element of the vector are instances of com.sun.jmx.snmp.SnmpVarBind

public abstract Object getUserData ()

Returns a handle on a user allocated contextual object. This contextual object is allocated through the SnmpUserDataFactory on a per SNMP request basis, and is handed back to the user via SnmpMibRequest (and derivative) objects. It is never accessed by the system, but might be handed back in multiple threads. It is thus the user responsibility to make sure he handles this object in a thread safe manner.

public abstract int getVarIndex (SnmpVarBind varbind)

Returns the varbind index that should be embedded in an SnmpStatusException for this particular varbind. This does not necessarily correspond to the "real" index value that will be returned in the result PDU.

Parameters
varbind The varbind for which the index value is querried. Note that this varbind must have been obtained from the enumeration returned by getElements(), or from the vector returned by getSublist().
Returns
  • The varbind index that should be embedded in an SnmpStatusException for this particular varbind.

public abstract int getVersion ()

Returns the SNMP protocol version of the original request. If SNMP V1 request are received, the version is upgraded to SNMP V2.

Returns
  • The SNMP protocol version of the original request.