Package org.opennms.netmgt.snmp.snmp4j
Class Snmp4JTrapNotifier.Snmp4JV1TrapInformation
- java.lang.Object
-
- org.opennms.netmgt.snmp.TrapInformation
-
- org.opennms.netmgt.snmp.snmp4j.Snmp4JTrapNotifier.Snmp4JV1TrapInformation
-
- Enclosing class:
- Snmp4JTrapNotifier
public static class Snmp4JTrapNotifier.Snmp4JV1TrapInformation extends TrapInformation
-
-
Constructor Summary
Constructors Constructor Description Snmp4JV1TrapInformation(java.net.InetAddress agent, java.lang.String community, org.snmp4j.PDUv1 pdu)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.snmp4j.PDUv1
getPdu()
Returns the Protocol Data Unit that was encapsulated within the SNMP Trap messageint
getPduLength()
protected java.lang.Integer
getRequestId()
SnmpVarBindDTO
getSnmpVarBindDTO(int i)
long
getTimeStamp()
Get the SNMP TimeTicks value for the sysUpTime of the agent that generated the trap.java.net.InetAddress
getTrapAddress()
TrapIdentity
getTrapIdentity()
protected org.snmp4j.smi.VariableBinding
getVarBindAt(int i)
java.lang.String
getVersion()
java.lang.String
toString()
-
Methods inherited from class org.opennms.netmgt.snmp.TrapInformation
getAgentAddress, getCommunity, getCreationTime, getLocation, getSystemId, setCreationTime, setLocation, setSystemId, validate
-
-
-
-
Method Detail
-
getPdu
public org.snmp4j.PDUv1 getPdu()
Returns the Protocol Data Unit that was encapsulated within the SNMP Trap message
-
getTrapAddress
public java.net.InetAddress getTrapAddress()
- Specified by:
getTrapAddress
in classTrapInformation
- Returns:
- The
InetAddress
of the agent that generated the trap as found in the SNMPv1 AgentAddress field. This can vary from the value ofTrapInformation.getAgentAddress()
if the SNMPv1 trap has been forwarded.
-
getVersion
public java.lang.String getVersion()
- Specified by:
getVersion
in classTrapInformation
-
getPduLength
public int getPduLength()
- Specified by:
getPduLength
in classTrapInformation
-
getTimeStamp
public long getTimeStamp()
Description copied from class:TrapInformation
Get the SNMP TimeTicks value for the sysUpTime of the agent that generated the trap. Note that the units for this value are 1/100ths of a second instead of milliseconds.- Specified by:
getTimeStamp
in classTrapInformation
-
getTrapIdentity
public TrapIdentity getTrapIdentity()
- Specified by:
getTrapIdentity
in classTrapInformation
-
getVarBindAt
protected org.snmp4j.smi.VariableBinding getVarBindAt(int i)
-
getSnmpVarBindDTO
public SnmpVarBindDTO getSnmpVarBindDTO(int i)
- Specified by:
getSnmpVarBindDTO
in classTrapInformation
-
getRequestId
protected java.lang.Integer getRequestId()
- Specified by:
getRequestId
in classTrapInformation
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-