java.lang.Object
org.snmp4j.util.SnmpConfigurator
The
SnmpConfigurator
class configures a Snmp
instance
with settings taken from a Map
conforming to the format returned
by ArgumentParser.parse(String[] args)
.
In addition, a PDUFactory
and Target
can be created using
settings from a Map
too.- Since:
- 1.10
- Version:
- 3.0
- Author:
- Frank Fock
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
ConstructorDescriptionSnmpConfigurator
(boolean commandResponder) SnmpConfigurator
(Properties props) SnmpConfigurator
(Properties props, boolean commandResponder) -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(Session snmp, USM usm, MessageDispatcher messageDispatcher, Map<String, List<Object>> settings) void
static OctetString
createOctetString
(String s, String defaultString) Create an OctetString from a String value.static OID
getAuthProtocolOid
(String authP) getBindAddress
(Map<String, List<Object>> settings) getPDUFactory
(Map<String, List<Object>> settings) static OID
getPrivProtocolOid
(String privP) boolean
void
setCommandResponder
(boolean commandResponder)
-
Field Details
-
O_VERSION
- See Also:
-
P_VERSION
- See Also:
-
F_VERSION
- See Also:
-
O_LOCAL_ENGINE_ID
- See Also:
-
P_LOCAL_ENGINE_ID
- See Also:
-
F_LOCAL_ENGINE_ID
- See Also:
-
O_AUTHORITATIVE_ENGINE_ID
- See Also:
-
P_AUTHORITATIVE_ENGINE_ID
- See Also:
-
F_AUTHORITATIVE_ENGINE_ID
- See Also:
-
O_COMMUNITY
- See Also:
-
P_COMMUNITY
- See Also:
-
F_COMMUNITY
- See Also:
-
O_CONTEXT_NAME
- See Also:
-
P_CONTEXT_NAME
- See Also:
-
F_CONTEXT_NAME
- See Also:
-
O_CONTEXT_ENGINE_ID
- See Also:
-
P_CONTEXT_ENGINE_ID
- See Also:
-
F_CONTEXT_ENGINE_ID
- See Also:
-
O_SECURITY_NAME
- See Also:
-
P_SECURITY_NAME
- See Also:
-
F_SECURITY_NAME
- See Also:
-
O_RETRIES
- See Also:
-
P_RETRIES
- See Also:
-
F_RETRIES
- See Also:
-
O_TIMEOUT
- See Also:
-
P_TIMEOUT
- See Also:
-
F_TIMEOUT
- See Also:
-
O_ADDRESS
- See Also:
-
P_ADDRESS
- See Also:
-
F_ADDRESS
- See Also:
-
O_BIND_ADDRESS
- See Also:
-
P_BIND_ADDRESS
- See Also:
-
F_BIND_ADDRESS
- See Also:
-
O_AUTH_PASSPHRASE
- See Also:
-
P_AUTH_PASSPHRASE
- See Also:
-
F_AUTH_PASSPHRASE
- See Also:
-
O_PRIV_PASSPHRASE
- See Also:
-
P_PRIV_PASSPHRASE
- See Also:
-
F_PRIV_PASSPHRASE
- See Also:
-
O_AUTH_PROTOCOL
- See Also:
-
P_AUTH_PROTOCOL
- See Also:
-
F_AUTH_PROTOCOL
- See Also:
-
O_PRIV_PROTOCOL
- See Also:
-
P_PRIV_PROTOCOL
- See Also:
-
F_PRIV_PROTOCOL
- See Also:
-
O_OPERATION
- See Also:
-
P_OPERATION
- See Also:
-
F_OPERATION
- See Also:
-
O_MAX_REPETITIONS
- See Also:
-
P_MAX_REPETITIONS
- See Also:
-
F_MAX_REPETITIONS
- See Also:
-
O_NON_REPEATERS
- See Also:
-
P_NON_REPEATERS
- See Also:
-
F_NON_REPEATERS
- See Also:
-
O_TRAPV1_AGENT_ADDR
- See Also:
-
P_TRAPV1_AGENT_ADDR
- See Also:
-
F_TRAPV1_AGENT_ADDR
- See Also:
-
O_TRAP_OID
- See Also:
-
P_TRAP_OID
- See Also:
-
F_TRAP_OID
- See Also:
-
O_TRAP_UPTIME
- See Also:
-
P_TRAP_UPTIME
- See Also:
-
F_TRAP_UPTIME
- See Also:
-
O_TRAPV1_ENTERPRISE
- See Also:
-
P_TRAPV1_ENTERPRISE
- See Also:
-
F_TRAPV1_ENTERPRISE
- See Also:
-
O_TRAPV1_SPECIFIC_ID
- See Also:
-
P_TRAPV1_SPECIFIC_ID
- See Also:
-
F_TRAPV1_SPECIFIC_ID
- See Also:
-
O_TRAPV1_GENERIC_ID
- See Also:
-
P_TRAPV1_GENERIC_ID
- See Also:
-
F_TRAPV1_GENERIC_ID
- See Also:
-
O_BOOT_COUNTER
- See Also:
-
P_BOOT_COUNTER
- See Also:
-
F_BOOT_COUNTER
- See Also:
-
O_SEC_LEVEL
- See Also:
-
P_SEC_LEVEL
- See Also:
-
F_SEC_LEVEL
- See Also:
-
O_SEC_MODEL
- See Also:
-
P_SEC_MODEL
- See Also:
-
F_SEC_MODEL
- See Also:
-
O_TLS_LOCAL_ID
- See Also:
-
P_TLS_LOCAL_ID
- See Also:
-
F_TLS_LOCAL_ID
- See Also:
-
O_TLS_PEER_ID
- See Also:
-
P_TLS_PEER_ID
- See Also:
-
F_TLS_PEER_ID
- See Also:
-
O_TLS_CERT_FINGERPRINT
- See Also:
-
P_TLS_CERT_FINGERPRINT
- See Also:
-
F_TLS_CERT_FINGERPRINT
- See Also:
-
O_TLS_TRUST_CA
- See Also:
-
P_TLS_TRUST_CA
- See Also:
-
F_TLS_TRUST_CA
- See Also:
-
O_TLS_VERSION
- See Also:
-
P_TLS_VERSION
- See Also:
-
F_TLS_VERSION
- See Also:
-
O_DTLS_VERSION
- See Also:
-
P_DTLS_VERSION
- See Also:
-
F_DTLS_VERSION
- See Also:
-
-
Constructor Details
-
SnmpConfigurator
public SnmpConfigurator() -
SnmpConfigurator
-
SnmpConfigurator
public SnmpConfigurator(boolean commandResponder) -
SnmpConfigurator
-
-
Method Details
-
isCommandResponder
public boolean isCommandResponder() -
setCommandResponder
public void setCommandResponder(boolean commandResponder) -
configure
-
configure
-
getPrivProtocolOid
-
getAuthProtocolOid
-
getPDUFactory
-
getTarget
-
getBindAddress
-
createOctetString
Create an OctetString from a String value.- Parameters:
s
- the string value to convert. If it starts with0x
its trailing value will be interpreted as a hex string with colon (:) separator.defaultString
- an optional default ifs
isnull
.- Returns:
- an OctetString or
null
ifs
isnull
. - Since:
- 1.10.2
-