|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.protocols.snmp.SnmpTrapSession.TrapHandler
The internal trap handler class is designed to receive information from the enclosed SnmpPortal class. The information is the processed and forwarded when appropiate to the SnmpTrapHandler registered with the session.
Field Summary | |
private SnmpTrapSession |
m_forWhom
Who to pass as the session parameter |
Constructor Summary | |
SnmpTrapSession.TrapHandler(SnmpTrapSession sess)
Creates a in internal trap handler to be the intermediary for the interface between the SnmpPortal and the TrapSession. |
Method Summary | |
void |
processBadDatagram(java.net.DatagramPacket p)
Invoked when bad datagrams are received. |
void |
processException(java.lang.Exception e)
Invoked when an exception occurs in the session. |
void |
processSnmpMessage(java.net.InetAddress agent,
int port,
SnmpInt32 version,
SnmpOctetString community,
int pduType,
SnmpPduPacket pdu)
Processes the default V1 & V2 messages. |
void |
processSnmpTrap(java.net.InetAddress agent,
int port,
SnmpOctetString community,
SnmpPduTrap pdu)
Processes V1 trap messages. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private SnmpTrapSession m_forWhom
Constructor Detail |
public SnmpTrapSession.TrapHandler(SnmpTrapSession sess)
Creates a in internal trap handler to be the intermediary for the interface between the SnmpPortal and the TrapSession.
sess
- The trap session reference.Method Detail |
public void processSnmpMessage(java.net.InetAddress agent, int port, SnmpInt32 version, SnmpOctetString community, int pduType, SnmpPduPacket pdu) throws SnmpPduEncodingException
Processes the default V1 & V2 messages.
processSnmpMessage
in interface SnmpPacketHandler
agent
- The sending agentport
- The remote port.version
- The SNMP Version of the message.community
- The community string from the message.pduType
- The type of pdupdu
- The actual pdu
SnmpPduEncodingException
- Thrown if the pdu fails to decode.SnmpPortal.Receiver.run()
,
SnmpPortal.handlePkt(java.net.DatagramPacket)
public void processSnmpTrap(java.net.InetAddress agent, int port, SnmpOctetString community, SnmpPduTrap pdu) throws SnmpPduEncodingException
Processes V1 trap messages.
processSnmpTrap
in interface SnmpPacketHandler
agent
- The sending agentport
- The remote port.community
- The community string from the message.pdu
- The actual pdu
SnmpPduEncodingException
- Thrown if the pdu fails to decode.SnmpPduTrap
public void processBadDatagram(java.net.DatagramPacket p)
Invoked when bad datagrams are received.
processBadDatagram
in interface SnmpPacketHandler
p
- The datagram packet in question.public void processException(java.lang.Exception e)
Invoked when an exception occurs in the session.
processException
in interface SnmpPacketHandler
e
- The exception.SnmpPortal
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |