public class V2TrapInformation extends TrapInformation
Constructor and Description |
---|
V2TrapInformation(InetAddress agent,
String community,
SnmpPduPacket pdu)
Constructs a new trap information instance that contains the sending
agent, the community string, and the Protocol Data Unit.
|
Modifier and Type | Method and Description |
---|---|
int |
getPduLength() |
protected Integer |
getRequestId() |
SnmpVarBindDTO |
getSnmpVarBindDTO(int i) |
long |
getTimeStamp()
Get the SNMP TimeTicks value for the sysUpTime of the agent that
generated the trap.
|
InetAddress |
getTrapAddress() |
TrapIdentity |
getTrapIdentity() |
String |
getVersion() |
String |
toString() |
void |
validate()
Validate the trap.
|
getAgentAddress, getCommunity, getCreationTime, getLocation, getSystemId, setCreationTime, setLocation, setSystemId
public V2TrapInformation(InetAddress agent, String community, SnmpPduPacket pdu)
agent
- The sending agent's addresscommunity
- The community string from the SNMP packet.pdu
- The encapsulated Protocol Data Unit.public int getPduLength()
getPduLength
in class TrapInformation
public long getTimeStamp()
TrapInformation
getTimeStamp
in class TrapInformation
public TrapIdentity getTrapIdentity()
getTrapIdentity
in class TrapInformation
public InetAddress getTrapAddress()
getTrapAddress
in class TrapInformation
TrapInformation.getAgentAddress()
but for SNMPv1
traps, the value can be different if the trap has been forwarded. It then
represents the true source IP address of the trap event.public String getVersion()
getVersion
in class TrapInformation
public void validate() throws SnmpException
TrapInformation
validate
in class TrapInformation
SnmpException
- on validation error.public SnmpVarBindDTO getSnmpVarBindDTO(int i)
getSnmpVarBindDTO
in class TrapInformation
protected Integer getRequestId()
getRequestId
in class TrapInformation
Copyright © 2021. All rights reserved.