|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.protocols.snmp.SnmpParameters
The SnmpParameters class is used to define the parameters for an SnmpSession. The parameters include the read/write community strings. The protocol version and the ASN.1 encoder used to encode/decode transmissions.
| Field Summary | |
static java.lang.String |
defaultCommunity
The default read-only community string |
static org.opennms.protocols.snmp.asn1.AsnEncoder |
defaultEncoder
The AsnEncoder used by default. |
static int |
defaultVersion
The SNMP protocol version used by default. |
| Constructor Summary | |
SnmpParameters()
The default class constructor. |
|
SnmpParameters(int version)
Constructs a default object with the specified SNMP protocol version. |
|
SnmpParameters(SnmpParameters second)
Constructs a copy of the parameters defined in the object second. |
|
SnmpParameters(java.lang.String read)
Constructs a default object with the specified read-only community string. |
|
SnmpParameters(java.lang.String read,
java.lang.String write)
Constructs an object with the specified read-only and write-only community strings. |
|
| Method Summary | |
java.lang.Object |
clone()
Used to get a newly created duplicate of the current object. |
org.opennms.protocols.snmp.asn1.AsnEncoder |
getEncoder()
Retreives the current ASN.1 encoder object. |
java.lang.String |
getReadCommunity()
Retreives the current read community string from the parameters. |
int |
getVersion()
Returns the current SNMP version defined by the parameters. |
java.lang.String |
getWriteCommunity()
Retreives the current write community string set in the parameters. |
void |
setEncoder(org.opennms.protocols.snmp.asn1.AsnEncoder encoder)
Sets the ASN.1 encoder. |
void |
setReadCommunity(java.lang.String rd)
Used to set the parameters read community string. |
void |
setVersion(int ver)
Use to set the SNMP protocol version. |
void |
setWriteCommunity(java.lang.String wr)
Used to set the parameters write community string. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String defaultCommunity
public static final org.opennms.protocols.snmp.asn1.AsnEncoder defaultEncoder
public static final int defaultVersion
| Constructor Detail |
public SnmpParameters()
defaultCommunity,
defaultEncoder,
defaultVersionpublic SnmpParameters(SnmpParameters second)
second - The object to copy into self.public SnmpParameters(int version)
version - The SNMP protocol version.public SnmpParameters(java.lang.String read)
read - The read-only community string.
public SnmpParameters(java.lang.String read,
java.lang.String write)
read - The read-only community string.write - The write-only community string.| Method Detail |
public java.lang.String getReadCommunity()
public void setReadCommunity(java.lang.String rd)
rd - The new read community string.String.getBytes()public java.lang.String getWriteCommunity()
public void setWriteCommunity(java.lang.String wr)
wr - The new write community string.String.getBytes()public int getVersion()
public void setVersion(int ver)
ver - The SNMP version protocol to use.SnmpSMI.SNMPV1,
SnmpSMI.SNMPV2public org.opennms.protocols.snmp.asn1.AsnEncoder getEncoder()
public void setEncoder(org.opennms.protocols.snmp.asn1.AsnEncoder encoder)
encoder - The new encoder to use.public java.lang.Object clone()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||