|
OpenNMS API 1.2.3 | |||||||||
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 AsnEncoder |
defaultEncoder
The AsnEncoder used by default. |
static int |
defaultVersion
The SNMP protocol version used by default. |
private AsnEncoder |
m_encoder
The AsnEncoder object used by the session to encode and decode information. |
private java.lang.String |
m_readCommunity
The read community string. |
private int |
m_version
The SNMP protocol version used for communication. |
private java.lang.String |
m_writeCommunity
The write community string |
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. |
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(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 |
private java.lang.String m_readCommunity
private java.lang.String m_writeCommunity
private int m_version
SnmpSMI.SNMPV1
,
SnmpSMI.SNMPV2
private AsnEncoder m_encoder
BerEncoder
public static final java.lang.String defaultCommunity
public static final AsnEncoder defaultEncoder
public static final int defaultVersion
Constructor Detail |
public SnmpParameters()
defaultCommunity
,
defaultEncoder
,
defaultVersion
public 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.SNMPV2
public AsnEncoder getEncoder()
public void setEncoder(AsnEncoder encoder)
encoder
- The new encoder to use.public java.lang.Object clone()
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |