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

SnmpMibRequestImpl

public final class SnmpMibRequestImpl extends Object implements SnmpMibRequest
This class implements the SnmpMibRequest interface. It represents the part of a SNMP request that involves a specific MIB. One instance of this class will be created for every MIB involved in a SNMP request, and will be passed to the SnmpMibAgent in charge of handling that MIB. Instances of this class are allocated by the SNMP engine. You will never need to use this class directly. You will only access instances of this class through their SnmpMibRequest interface.

Fields Summary
private Vector
varbinds
private int
version
private Object
data
private com.sun.jmx.snmp.SnmpPdu
reqPdu
private SnmpRequestTree
tree
private com.sun.jmx.snmp.SnmpEngine
engine
private String
principal
private int
securityLevel
private int
securityModel
private byte[]
contextName
private byte[]
accessContextName
Constructors Summary
public SnmpMibRequestImpl(com.sun.jmx.snmp.SnmpEngine engine, com.sun.jmx.snmp.SnmpPdu reqPdu, Vector vblist, int protocolVersion, Object userData, String principal, int securityLevel, int securityModel, byte[] contextName, byte[] accessContextName)

param
engine The local engine.
param
reqPdu The received pdu.
param
vblist The vector of SnmpVarBind objects in which the MIB concerned by this request is involved.
param
protocolVersion The protocol version of the SNMP request.
param
userData User allocated contextual data. This object must be allocated on a per SNMP request basis through the SnmpUserDataFactory registered with the SnmpAdaptorServer, and is handed back to the user through SnmpMibRequest objects.

	varbinds   = vblist;
	version    = protocolVersion;
	data       = userData;
	this.reqPdu = reqPdu;
	this.engine = engine;
	this.principal = principal;
	this.securityLevel = securityLevel;
	this.securityModel = securityModel;
	this.contextName = contextName;
	this.accessContextName = accessContextName;
    
Methods Summary
public voidaddVarBind(com.sun.jmx.snmp.SnmpVarBind varbind)

	varbinds.addElement(varbind);
    
public 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.

return
The checked context.

	return accessContextName;
    
public 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.

return
The context name.

	return contextName;
    
public final java.util.EnumerationgetElements()

return varbinds.elements();
public com.sun.jmx.snmp.SnmpEnginegetEngine()
Returns the local engine. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise null is returned.

return
the local engine.

	return engine;
    
public final com.sun.jmx.snmp.SnmpPdugetPdu()

	return reqPdu;
    
public java.lang.StringgetPrincipal()
Gets the incoming request principal. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise null is returned.

return
The request principal.

	return principal;
    
public final intgetRequestPduVersion()

return reqPdu.version;
final SnmpRequestTreegetRequestTree()

return tree;
public intgetSecurityLevel()
Gets the incoming request security level. This level is defined in {@link com.sun.jmx.snmp.SnmpEngine SnmpEngine}. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise -1 is returned.

return
The security level.

	return securityLevel;
    
public intgetSecurityModel()
Gets the incoming request security model. This parameter is returned only if SnmpV3AdaptorServer is the adaptor receiving this request. Otherwise -1 is returned.

return
The security model.

	return securityModel;
    
public final intgetSize()

	if (varbinds == null) return 0;
	return varbinds.size();
    
public final java.util.VectorgetSubList()

return varbinds;
public final java.lang.ObjectgetUserData()

return data;
public final intgetVarIndex(com.sun.jmx.snmp.SnmpVarBind varbind)

	return varbinds.indexOf(varbind);
    
final java.util.VectorgetVarbinds()

return varbinds;
public final intgetVersion()

return version;
final voidsetRequestTree(SnmpRequestTree tree)

this.tree = tree;