Package org.opennms.netmgt.snmp.joesnmp
Class JoeSnmpTrapNotifier
- java.lang.Object
-
- org.opennms.netmgt.snmp.joesnmp.JoeSnmpTrapNotifier
-
- All Implemented Interfaces:
SnmpTrapHandler
public class JoeSnmpTrapNotifier extends java.lang.Object implements SnmpTrapHandler
-
-
Constructor Summary
Constructors Constructor Description JoeSnmpTrapNotifier(TrapNotificationListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
snmpReceivedTrap(SnmpTrapSession session, java.net.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, java.net.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, java.lang.Object ref)
Processes an error condition that occurs in the SnmpTrapSession.
-
-
-
Constructor Detail
-
JoeSnmpTrapNotifier
public JoeSnmpTrapNotifier(TrapNotificationListener listener)
-
-
Method Detail
-
snmpReceivedTrap
public void snmpReceivedTrap(SnmpTrapSession session, java.net.InetAddress agent, int port, SnmpOctetString community, SnmpPduPacket pdu)
Process the recieved SNMP v2c trap that was received by the underlying trap session.
- Specified by:
snmpReceivedTrap
in interfaceSnmpTrapHandler
- Parameters:
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 data
-
snmpReceivedTrap
public void snmpReceivedTrap(SnmpTrapSession session, java.net.InetAddress agent, int port, SnmpOctetString community, SnmpPduTrap pdu)
Process the recieved SNMP v1 trap that was received by the underlying trap session.
- Specified by:
snmpReceivedTrap
in interfaceSnmpTrapHandler
- Parameters:
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 data
-
snmpTrapSessionError
public void snmpTrapSessionError(SnmpTrapSession session, int error, java.lang.Object ref)
Processes an error condition that occurs in the SnmpTrapSession. The errors are logged and ignored by the trapd class.
- Specified by:
snmpTrapSessionError
in interfaceSnmpTrapHandler
- Parameters:
session
- The SNMP Trap Sessionerror
- The error condition value.ref
- The PDU reference, or potentially null. It may also be an exception.
-
-