|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object snmp.SNMPTrapSenderInterface
The class SNMPTrapSenderInterface implements an interface for sending SNMPv1 and SNMPv2 trap messages to a remote SNMP manager. The approach is that from version 1 of SNMP, using no encryption of data. Communication occurs via UDP, using port 162, the standard SNMP trap port, as the destination port.
Field Summary | |
static int |
SNMP_TRAP_PORT
|
Constructor Summary | |
SNMPTrapSenderInterface()
Construct a new trap sender object to send traps to remote SNMP hosts. |
|
SNMPTrapSenderInterface(int localPort)
Construct a new trap sender object to send traps to remote SNMP hosts, binding to the specified local port. |
Method Summary | |
void |
sendTrap(java.net.InetAddress hostAddress,
java.lang.String community,
SNMPv1TrapPDU pdu)
Send the supplied trap pdu to the specified host, using the supplied community name and using 0 for the version field in the SNMP message (corresponding to SNMP version 1). |
void |
sendTrap(java.net.InetAddress hostAddress,
java.lang.String community,
SNMPv2TrapPDU pdu)
Send the supplied trap pdu to the specified host, using the supplied community name and using 1 for the version field in the SNMP message. |
void |
sendTrap(int version,
java.net.InetAddress hostAddress,
java.lang.String community,
SNMPv1TrapPDU pdu)
Send the supplied SNMPv1 trap pdu to the specified host, using the supplied version number and community name. |
void |
sendTrap(int version,
java.net.InetAddress hostAddress,
java.lang.String community,
SNMPv2TrapPDU pdu)
Send the supplied SNMPv2 trap pdu to the specified host, using the supplied version number and community name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SNMP_TRAP_PORT
Constructor Detail |
public SNMPTrapSenderInterface() throws java.net.SocketException
public SNMPTrapSenderInterface(int localPort) throws java.net.SocketException
Method Detail |
public void sendTrap(int version, java.net.InetAddress hostAddress, java.lang.String community, SNMPv1TrapPDU pdu) throws java.io.IOException
java.io.IOException
public void sendTrap(java.net.InetAddress hostAddress, java.lang.String community, SNMPv1TrapPDU pdu) throws java.io.IOException
java.io.IOException
public void sendTrap(int version, java.net.InetAddress hostAddress, java.lang.String community, SNMPv2TrapPDU pdu) throws java.io.IOException
java.io.IOException
public void sendTrap(java.net.InetAddress hostAddress, java.lang.String community, SNMPv2TrapPDU pdu) throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |