| java.lang.Object snmp.SNMPTrapSenderInterface
SNMPTrapSenderInterface | public class SNMPTrapSenderInterface (Code) | | 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, unless
an alternate (non-standard) port is suppied in the constructor.
|
Constructor Summary | |
public | SNMPTrapSenderInterface() Construct a new trap sender object to send traps to remote SNMP hosts. | public | SNMPTrapSenderInterface(int remotePort) Construct a new trap sender object to send traps to remote SNMP hosts, sending to
the specified remote port. |
Method Summary | |
public void | sendTrap(int version, InetAddress hostAddress, String community, SNMPv1TrapPDU pdu) Send the supplied SNMPv1 trap pdu to the specified host, using the supplied version number
and community name. | public void | sendTrap(InetAddress hostAddress, 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). | public void | sendTrap(int version, InetAddress hostAddress, String community, SNMPv2TrapPDU pdu) Send the supplied SNMPv2 trap pdu to the specified host, using the supplied version number
and community name. | public void | sendTrap(InetAddress hostAddress, 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. |
SNMP_TRAP_PORT | final public static int SNMP_TRAP_PORT(Code) | | |
SNMPTrapSenderInterface | public SNMPTrapSenderInterface() throws SocketException(Code) | | Construct a new trap sender object to send traps to remote SNMP hosts.
|
SNMPTrapSenderInterface | public SNMPTrapSenderInterface(int remotePort) throws SocketException(Code) | | Construct a new trap sender object to send traps to remote SNMP hosts, sending to
the specified remote port.
|
sendTrap | public void sendTrap(int version, InetAddress hostAddress, String community, SNMPv1TrapPDU pdu) throws IOException(Code) | | Send the supplied SNMPv1 trap pdu to the specified host, using the supplied version number
and community name. Use version = 0 for SNMP version 1, or version = 1 for enhanced
capabilities provided through RFC 1157.
|
sendTrap | public void sendTrap(InetAddress hostAddress, String community, SNMPv1TrapPDU pdu) throws IOException(Code) | | 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).
|
sendTrap | public void sendTrap(int version, InetAddress hostAddress, String community, SNMPv2TrapPDU pdu) throws IOException(Code) | | Send the supplied SNMPv2 trap pdu to the specified host, using the supplied version number
and community name.
|
sendTrap | public void sendTrap(InetAddress hostAddress, String community, SNMPv2TrapPDU pdu) throws IOException(Code) | | 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.
|
|
|