public class JoeSnmpTrapNotifier extends Object implements SnmpTrapHandler
Constructor and Description |
---|
JoeSnmpTrapNotifier(TrapNotificationListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
snmpReceivedTrap(SnmpTrapSession session,
InetAddress agent,
int port,
SnmpOctetString community,
SnmpPduPacket pdu)
Process the recieved SNMP v2c trap that was received by the underlying
trap session.
|
void |
snmpReceivedTrap(SnmpTrapSession session,
InetAddress agent,
int port,
SnmpOctetString community,
SnmpPduTrap pdu)
Process the recieved SNMP v1 trap that was received by the underlying
trap session.
|
void |
snmpTrapSessionError(SnmpTrapSession session,
int error,
Object ref)
Processes an error condition that occurs in the SnmpTrapSession.
|
public JoeSnmpTrapNotifier(TrapNotificationListener listener)
public void snmpReceivedTrap(SnmpTrapSession session, InetAddress agent, int port, SnmpOctetString community, SnmpPduPacket pdu)
Process the recieved SNMP v2c trap that was received by the underlying trap session.
snmpReceivedTrap
in interface SnmpTrapHandler
session
- The trap session that received the datagram.agent
- The remote agent that sent the datagram.port
- The remmote port the trap was sent from.community
- The community string contained in the message.pdu
- The protocol data unit containing the datapublic void snmpReceivedTrap(SnmpTrapSession session, InetAddress agent, int port, SnmpOctetString community, SnmpPduTrap pdu)
Process the recieved SNMP v1 trap that was received by the underlying trap session.
snmpReceivedTrap
in interface SnmpTrapHandler
session
- The trap session that received the datagram.agent
- The remote agent that sent the datagram.port
- The remmote port the trap was sent from.community
- The community string contained in the message.pdu
- The protocol data unit containing the datapublic void snmpTrapSessionError(SnmpTrapSession session, int error, Object ref)
Processes an error condition that occurs in the SnmpTrapSession. The errors are logged and ignored by the trapd class.
snmpTrapSessionError
in interface SnmpTrapHandler
session
- The SNMP Trap Sessionerror
- The error condition value.ref
- The PDU reference, or potentially null. It may also be an
exception.Copyright © 2021. All rights reserved.