snmp
Class SNMPInformRequestSenderInterface

java.lang.Object
  extended bysnmp.SNMPInformRequestSenderInterface

public class SNMPInformRequestSenderInterface
extends java.lang.Object

The class SNMPInformRequestSenderInterface implements an interface for sending SNMPv2 inform request messages to a remote SNMP manager. The approach is that from version 2c of SNMP, using no encryption of data. Communication occurs via UDP, using port 162, the standard SNMP trap and inform request port, as the destination port.


Field Summary
static int SNMP_TRAP_PORT
           
 
Constructor Summary
SNMPInformRequestSenderInterface()
          Construct a new inform request sender object to send inform requests to remote SNMP hosts.
SNMPInformRequestSenderInterface(int localPort)
          Construct a new inform request sender object to send inform requests to remote SNMP hosts, binding to the specified local port.
 
Method Summary
 void sendInformRequest(java.net.InetAddress hostAddress, java.lang.String community, SNMPv2InformRequestPDU pdu)
          Send the supplied inform request pdu to the specified host, using the supplied community name and using 1 for the version field in the SNMP message.
 void sendInformRequest(int version, java.net.InetAddress hostAddress, java.lang.String community, SNMPv2InformRequestPDU pdu)
          Send the supplied SNMPv2 inform request 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

SNMP_TRAP_PORT

public static final int SNMP_TRAP_PORT
See Also:
Constant Field Values
Constructor Detail

SNMPInformRequestSenderInterface

public SNMPInformRequestSenderInterface()
                                 throws java.net.SocketException
Construct a new inform request sender object to send inform requests to remote SNMP hosts.


SNMPInformRequestSenderInterface

public SNMPInformRequestSenderInterface(int localPort)
                                 throws java.net.SocketException
Construct a new inform request sender object to send inform requests to remote SNMP hosts, binding to the specified local port.

Method Detail

sendInformRequest

public void sendInformRequest(int version,
                              java.net.InetAddress hostAddress,
                              java.lang.String community,
                              SNMPv2InformRequestPDU pdu)
                       throws java.io.IOException
Send the supplied SNMPv2 inform request pdu to the specified host, using the supplied version number and community name.

Throws:
java.io.IOException

sendInformRequest

public void sendInformRequest(java.net.InetAddress hostAddress,
                              java.lang.String community,
                              SNMPv2InformRequestPDU pdu)
                       throws java.io.IOException
Send the supplied inform request pdu to the specified host, using the supplied community name and using 1 for the version field in the SNMP message.

Throws:
java.io.IOException