Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jdmk.snmp.agent
Interface SnmpMibRequest

All Known Subinterfaces:
  SnmpMibSubRequest

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 SnmpMibRequest

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.

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

Method Detail

### getElements

    public Enumeration getElements()

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

  Returns:
    The element of the enumeration are instances of `SnmpVarBind`

### getSubList

    public Vector getSubList()

  Deprecated.
  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 `SnmpVarBind`

### getVersion

    public int getVersion()

  Deprecated.
  Returns the SNMP protocol version in which this request is expected to be handled by the `SnmpMibAgent`. If the received PDU was an SNMPv1 request, the SNMP adaptor may require the SnmpMibAgent to process this request as if it were originally received in SNMPv2.
  In this case, `getVersion()` will return `SnmpDefinitions.snmpVersionTwo` even though the original PDU version is SNMPv1.

  See also `getRequestPduVersion()`.

  Returns:
    The SNMP protocol version in which the request is expected to be handled.

### getRequestPduVersion

    public int getRequestPduVersion()

  Deprecated.
  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.
  Since:
    Java DMK 5.0

### getEngine

    public SnmpEngine getEngine()

  Deprecated.
  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, or `null`.
  Since:
    Java DMK 5.0

### getPrincipal

    public String getPrincipal()

  Deprecated.
  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, or `null`.
  Since:
    Java DMK 5.0

### getSecurityLevel

    public int getSecurityLevel()

  Deprecated.
  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, or `-1`.
  Since:
    Java DMK 5.0

### getSecurityModel

    public int getSecurityModel()

  Deprecated.
  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, or `-1`.
  Since:
    Java DMK 5.0

### getContextName

    public byte[] getContextName()

  Deprecated.
  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, or `null`.
  Since:
    Java DMK 5.0

### getAccessContextName

    public byte[] getAccessContextName()

  Deprecated.
  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, or `null`.
  Since:
    Java DMK 5.0

### getUserData

    public Object getUserData()

  Deprecated.
  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.

  Returns:
    A handle on a user allocated contextual object.

### getVarIndex

    public int getVarIndex(SnmpVarBind varbind)

  Deprecated.
  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 queried. 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.

### addVarBind

    public void addVarBind(SnmpVarBind varbind)

  Deprecated.
  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.

### getSize

    public int getSize()

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

  Returns:
    The number of elements in the sublist.

### getPdu

    public SnmpPdu getPdu()

  Deprecated.
  Returns the SNMP PDU attached to the request.

  Returns:
    The SNMP PDU.
  Since:
    Java DMK 5.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| FCS Release jdmk-5_1-b34.3 2007.01.18_18:11:52_MET
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.