public interface Target extends Serializable, Cloneable
Target
interface defines an abstract representation of a
remote SNMP entity. It represents a target with an Address object, as well
protocol parameters such as retransmission and timeout policy.Modifier and Type | Method and Description |
---|---|
Object |
clone() |
Address |
getAddress()
Gets the address of this target.
|
int |
getMaxSizeRequestPDU()
Gets the maximum size of request PDUs that this target is able to respond
to.
|
List<TransportMapping<? extends Address>> |
getPreferredTransports()
Gets the prioritised list of transport mappings to be used for this
target.
|
int |
getRetries()
Gets the number of retries.
|
int |
getSecurityLevel()
Gets the security level associated with this target.
|
int |
getSecurityModel()
Gets the security model associated with this target.
|
OctetString |
getSecurityName()
Gets the security name associated with this target.
|
long |
getTimeout()
Gets the timeout for a target.
|
int |
getVersion()
Gets the SNMP version (NMP messagen processing model) of the target.
|
void |
setAddress(Address address)
Sets the address of the target.
|
void |
setMaxSizeRequestPDU(int maxSizeRequestPDU)
Sets the maximum size of request PDUs that this target is able to receive.
|
void |
setRetries(int retries)
Sets the number of retries to be performed before a request is timed out.
|
void |
setSecurityLevel(int securityLevel)
Sets the security level for this target.
|
void |
setSecurityModel(int securityModel)
Sets the security model for this target.
|
void |
setSecurityName(OctetString securityName)
Sets the security name to be used with this target.
|
void |
setTimeout(long timeout)
Sets the timeout for a target.
|
void |
setVersion(int version)
Sets the SNMP version (thus the SNMP messagen processing model) of the
target.
|
Address getAddress()
void setAddress(Address address)
address
- an Address instance.void setVersion(int version)
version
- the message processing model ID.SnmpConstants.version1
,
SnmpConstants.version2c
,
SnmpConstants.version3
int getVersion()
SnmpConstants.version1
,
SnmpConstants.version2c
,
SnmpConstants.version3
void setRetries(int retries)
retries
- the number of retries. Note: If the number of retries is set to
0, then the request will be sent out exactly once.int getRetries()
void setTimeout(long timeout)
timeout
- timeout in milliseconds before a confirmed request is resent or
timed out.long getTimeout()
int getMaxSizeRequestPDU()
void setMaxSizeRequestPDU(int maxSizeRequestPDU)
maxSizeRequestPDU
- the maximum PDU (SNMP message) size this session will be able to
process.List<TransportMapping<? extends Address>> getPreferredTransports()
TransportMapping
instances.Object clone()
int getSecurityModel()
int
value as defined in the SecurityModel
interface or any third party subclass thereof.OctetString getSecurityName()
OctetString
instance (never null
).int getSecurityLevel()
void setSecurityLevel(int securityLevel)
securityLevel
- one of
void setSecurityModel(int securityModel)
securityModel
- an int
value as defined in the SecurityModel
interface or any third party subclass thereof.void setSecurityName(OctetString securityName)
securityName
- an OctetString
instance (must not be null
).getSecurityName()
Copyright © 2016 SNMP4J.org. All rights reserved.