public class CommunityTarget extends AbstractTarget
CommunityTarget represents SNMP target properties for
community based message processing models (SNMPv1 and SNMPv2c).securityLevel, securityModel, securityName| Constructor and Description |
|---|
CommunityTarget()
Default constructor.
|
CommunityTarget(Address address,
OctetString community)
Creates a fully specified community target.
|
| Modifier and Type | Method and Description |
|---|---|
OctetString |
getCommunity()
Gets the community octet string (which is the same as the security name).
|
int |
getSecurityModel()
Gets the security model associated with this target.
|
void |
setCommunity(OctetString community)
Sets the community octet sting.
|
void |
setSecurityLevel(int securityLevel)
Sets the security level for this target.
|
void |
setSecurityModel(int securityModel)
Sets the security model for this target.
|
String |
toString() |
clone, equals, getAddress, getMaxSizeRequestPDU, getPreferredTransports, getRetries, getSecurityLevel, getSecurityName, getTimeout, getVersion, hashCode, setAddress, setMaxSizeRequestPDU, setPreferredTransports, setRetries, setSecurityName, setTimeout, setVersion, toStringAbstractTargetpublic CommunityTarget()
public CommunityTarget(Address address, OctetString community)
address - the transport Address of the target.community - the community to be used for the target.public OctetString getCommunity()
AbstractTarget.getSecurityName() directly.OctetString instance, should be never null when using this target to send
messages over community based SNMP (v1 and v2c).public void setCommunity(OctetString community)
null and then calls AbstractTarget.setSecurityName(org.snmp4j.smi.OctetString)
with the supplied parameter.community - an OctetString instance which must not be
null.public int getSecurityModel()
TargetgetSecurityModel in interface TargetgetSecurityModel in class AbstractTargetint value as defined in the SecurityModel
interface or any third party subclass thereof.public void setSecurityLevel(int securityLevel)
AbstractTargetsetSecurityLevel in interface TargetsetSecurityLevel in class AbstractTargetsecurityLevel - one of
public void setSecurityModel(int securityModel)
AbstractTargetsetSecurityModel in interface TargetsetSecurityModel in class AbstractTargetsecurityModel - an int value as defined in the SecurityModel
interface or any third party subclass thereof.public String toString()
toString in class AbstractTargetCopyright © 2016 SNMP4J.org. All Rights Reserved.