FileDocCategorySizeDatePackage
SnmpParams.javaAPI DocJava SE 5 API2196Fri Aug 26 14:55:04 BST 2005com.sun.jmx.snmp

SnmpParams

public abstract class SnmpParams extends Object implements com.sun.jmx.snmp.SnmpDefinitions
This class is the base class of all parameters that are used when making SNMP requests to an SnmpPeer.

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

since
1.5

Fields Summary
private int
protocolVersion
Constructors Summary
SnmpParams(int version)

      
	protocolVersion = version;
    
SnmpParams()

Methods Summary
public abstract booleanallowSnmpSets()
Checks whether parameters are in place for an SNMP set operation.

return
true if parameters are in place, false otherwise.

public intgetProtocolVersion()
Returns the version of the protocol to use. The returned value is:
  • {@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionOne snmpVersionOne} if the protocol is SNMPv1
  • {@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionTwo snmpVersionTwo} if the protocol is SNMPv2
  • {@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionThree snmpVersionThree} if the protocol is SNMPv3

return
The version of the protocol to use.

        return protocolVersion ;
    
public voidsetProtocolVersion(int protocolversion)
Sets the version of the protocol to be used. The version should be identified using the definitions contained in {@link com.sun.jmx.snmp.SnmpDefinitions SnmpDefinitions}.
For instance if you wish to use SNMPv2, you can call the method as follows:
setProtocolVersion(SnmpDefinitions.snmpVersionTwo);

param
protocolversion The version of the protocol to be used.

        this.protocolVersion = protocolversion ;