All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.jaw.snmp.manager.SnmpParameters
java.lang.Object
|
+----com.sun.jaw.snmp.manager.SnmpParameters
- public class SnmpParameters
- extends Object
- implements SnmpDefinitions, Cloneable, Serializable
This class contains a set of resources that are used by an
SnmpSession object while sending or receiving packets
to and from a SnmpPeer. An SnmpPeer can
be configured explicitly to use a specific SnmpParameter.
Many SnmpPeer objects can share a single parameter object.
Note: Changing values for a SnmpParameter object affects all
SnmpPeer objects that share the parameter object.
- See Also:
- SnmpSession, SnmpPeer
-
defaultRdCommunity
- Specify the default community string to use for GET operations.
-
SnmpParameters()
- Creates a
SnmpParameters object with default set up.
-
SnmpParameters(String, String)
- Creates a
SnmpParameters object.
-
allowSnmpSets()
- Checks whether parameters are in place for a SNMP
set operation.
-
clone()
- Allow to clone the object and its content.
-
encodeAuthentication(int)
- For Java DMK internal use only.
-
equals(Object)
- Compares two objects.
-
getProtocolVersion()
- Returns the version of the protocol to use.
-
getRdCommunity()
- Get the community to be used when issuing GET operations
-
getWrCommunity()
- Get the community to be used when issuing SET operations
-
setProtocolVersion(int)
- Set the version of the protocol to be used.
-
setRdCommunity(String)
- Allows to specify the community string to use when performing GET operations.
-
setWrCommunity(String)
- Set the community to be used when issuing SET operations
defaultRdCommunity
public static final String defaultRdCommunity
- Specify the default community string to use for GET operations.
By default, the value is "public".
SnmpParameters
public SnmpParameters()
- Creates a
SnmpParameters object with default set up.
By default, set operations are not allowed and the community string to
use is "public".
SnmpParameters
public SnmpParameters(String rdc,
String wrc)
- Creates a
SnmpParameters object.
The methods allows to specify the read/write community strings
- Parameters:
- rdc - community string to use for GET operations
- wrc - community string to use for SET operations
getProtocolVersion
public int getProtocolVersion()
- Returns the version of the protocol to use.
The returned value is
- SnmpDefinitions.snmpVersionTwo if the protocol is SNMPv2
- SnmpDefinitions.snmpVersionOne if the protocol is SNMPv1
setProtocolVersion
public void setProtocolVersion(int version)
- Set the version of the protocol to be used.
The version should be identified using the definitions
contained in
SnmpDefinitions.
For instance if you are willing to use SNMPv2, you could call the
method as follows:
setProtocolVersion(SnmpDefinitions.snmpVersionTwo);
allowSnmpSets
public boolean allowSnmpSets()
- Checks whether parameters are in place for a SNMP
set operation.
setRdCommunity
public synchronized void setRdCommunity(String read)
- Allows to specify the community string to use when performing GET operations.
getRdCommunity
public String getRdCommunity()
- Get the community to be used when issuing GET operations
setWrCommunity
public void setWrCommunity(String s)
- Set the community to be used when issuing SET operations
getWrCommunity
public String getWrCommunity()
- Get the community to be used when issuing SET operations
equals
public synchronized boolean equals(Object obj)
- Compares two objects.
Two SnmpParameters are equal if they correspond to the same protocol version,
read community and write community.
- Overrides:
- equals in class Object
encodeAuthentication
public byte[] encodeAuthentication(int snmpCmd) throws SnmpStatusException
- For Java DMK internal use only.
clone
public synchronized Object clone()
- Allow to clone the object and its content.
- Overrides:
- clone in class Object
All Packages Class Hierarchy This Package Previous Next Index