Package org.opennms.netmgt.snmp.snmp4j
Class Snmp4JAgentConfig
- java.lang.Object
-
- org.opennms.netmgt.snmp.snmp4j.Snmp4JAgentConfig
-
public class Snmp4JAgentConfig extends Object
-
-
Constructor Summary
Constructors Constructor Description Snmp4JAgentConfig(SnmpAgentConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.snmp4j.smi.Address
convertAddress(InetAddress address, int port)
This method converts an InetAddress to an implementation of an SNMP4J Address (UdpAddress or TcpAddress) TODO: This needs to be updated when the protocol flag is added to the SNMP Config so that UDP or TCP can be used in v3 operations.org.snmp4j.PDU
createPdu(int type)
Creates an SNMP4J PDU based on the SNMP4J version constants.org.snmp4j.Snmp
createSnmpSession()
org.snmp4j.smi.OctetString
getAuthPassPhrase()
org.snmp4j.smi.OID
getAuthProtocol()
org.snmp4j.smi.OctetString
getContextEngineID()
org.snmp4j.smi.OctetString
getContextName()
InetAddress
getInetAddress()
int
getMaxRepetitions()
int
getMaxRequestSize()
int
getMaxVarsPerPdu()
int
getPort()
org.snmp4j.smi.OctetString
getPrivPassPhrase()
org.snmp4j.smi.OID
getPrivProtocol()
int
getRetries()
int
getSecurityLevel()
org.snmp4j.smi.OctetString
getSecurityName()
org.snmp4j.Target
getTarget()
int
getTimeout()
int
getVersion()
String
getVersionString()
Returns a string representation of the SNMP4J version constantString
getWriteCommunity()
String
toString()
-
-
-
Constructor Detail
-
Snmp4JAgentConfig
public Snmp4JAgentConfig(SnmpAgentConfig config)
-
-
Method Detail
-
getInetAddress
public InetAddress getInetAddress()
-
getAuthPassPhrase
public org.snmp4j.smi.OctetString getAuthPassPhrase()
-
getAuthProtocol
public org.snmp4j.smi.OID getAuthProtocol()
-
getMaxRequestSize
public int getMaxRequestSize()
-
getMaxVarsPerPdu
public int getMaxVarsPerPdu()
-
getMaxRepetitions
public int getMaxRepetitions()
-
getPort
public int getPort()
-
getRetries
public int getRetries()
-
getSecurityLevel
public int getSecurityLevel()
-
getSecurityName
public org.snmp4j.smi.OctetString getSecurityName()
-
getTimeout
public int getTimeout()
-
getVersion
public int getVersion()
-
getVersionString
public String getVersionString()
Returns a string representation of the SNMP4J version constant
-
getWriteCommunity
public String getWriteCommunity()
-
convertAddress
public static org.snmp4j.smi.Address convertAddress(InetAddress address, int port)
This method converts an InetAddress to an implementation of an SNMP4J Address (UdpAddress or TcpAddress) TODO: This needs to be updated when the protocol flag is added to the SNMP Config so that UDP or TCP can be used in v3 operations.
-
getTarget
public org.snmp4j.Target getTarget()
-
getPrivProtocol
public org.snmp4j.smi.OID getPrivProtocol()
-
getPrivPassPhrase
public org.snmp4j.smi.OctetString getPrivPassPhrase()
-
getContextName
public org.snmp4j.smi.OctetString getContextName()
-
getContextEngineID
public org.snmp4j.smi.OctetString getContextEngineID()
-
createSnmpSession
public org.snmp4j.Snmp createSnmpSession() throws IOException
- Throws:
IOException
-
createPdu
public org.snmp4j.PDU createPdu(int type)
Creates an SNMP4J PDU based on the SNMP4J version constants. A v3 request requires a ScopedPDU.- Parameters:
type
-- Returns:
-
-