public class SnmpParameters extends Object implements Cloneable
| Modifier and Type | Field and Description |
|---|---|
static 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.
|
| 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(String read)
Constructs a default object with the specified read-only community
string.
|
SnmpParameters(String read,
String write)
Constructs an object with the specified read-only and write-only
community strings.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Used to get a newly created duplicate of the current object.
|
AsnEncoder |
getEncoder()
Retreives the current ASN.1 encoder object.
|
String |
getReadCommunity()
Retreives the current read community string from the parameters.
|
int |
getVersion()
Returns the current SNMP version defined by the parameters.
|
String |
getWriteCommunity()
Retreives the current write community string set in the parameters.
|
void |
setEncoder(AsnEncoder encoder)
Sets the ASN.1 encoder.
|
void |
setReadCommunity(String rd)
Used to set the parameters read community string.
|
void |
setVersion(int ver)
Use to set the SNMP protocol version.
|
void |
setWriteCommunity(String wr)
Used to set the parameters write community string.
|
public static final 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(String read)
read - The read-only community string.public String getReadCommunity()
public void setReadCommunity(String rd)
rd - The new read community string.String.getBytes()public String getWriteCommunity()
public void setWriteCommunity(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.Copyright © 2020. All rights reserved.