public class SnmpParameters
extends java.lang.Object
implements java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
private java.lang.String m_readCommunity
private java.lang.String m_writeCommunity
private int m_version
SnmpSMI.SNMPV1,
SnmpSMI.SNMPV2private AsnEncoder m_encoder
BerEncoderpublic static final java.lang.String defaultCommunity
public static final AsnEncoder defaultEncoder
public static final int defaultVersion
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.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 AsnEncoder getEncoder()
public void setEncoder(AsnEncoder encoder)
encoder - The new encoder to use.public java.lang.Object clone()
clone in class java.lang.ObjectGenerated by iurt on 2013.