uk.co.westhawk.examplev3
Class SendInform
java.lang.Object
|
+--uk.co.westhawk.examplev3.SendInform
- All Implemented Interfaces:
- java.util.Observer
- public class SendInform
- extends java.lang.Object
- implements java.util.Observer
The SendInform application sends an inform using the OneInformPdu.
All parameters can be configured
in the properties file.
The value for sysUpTime and snmpTrapOID are hard coded.
The name of the properties file can be passed as first argument to
this application. If there is no such argument, it will look for
SendInform.properties
. If this file does not exist, the
application will use default parameters.
Note:
The stack so far only supports sending an Inform. Receiving an Inform
and replying with a Response is NOT yet supported!
- Version:
- $Revision: 1.4 $ $Date: 2002/11/04 17:55:13 $
- Author:
- Birgit Arkesteijn
- See Also:
OneInformPdu
Constructor Summary |
SendInform(java.lang.String propertiesFilename)
Constructor. |
Method Summary |
void |
init()
|
static void |
main(java.lang.String[] args)
|
void |
update(java.util.Observable obs,
java.lang.Object ov)
Implementing the Observer interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sysUpTime
public static final java.lang.String sysUpTime
sysContact
public static final java.lang.String sysContact
snmpTrapOID
public static final java.lang.String snmpTrapOID
- The authoritative identification of the notification currently
being sent. This variable occurs as the second varbind in every
SNMPv2-Trap-PDU and InformRequest-PDU.
coldStart
public static final java.lang.String coldStart
warmStart
public static final java.lang.String warmStart
linkDown
public static final java.lang.String linkDown
linkUp
public static final java.lang.String linkUp
authenticationFailure
public static final java.lang.String authenticationFailure
egpNeighborLoss
public static final java.lang.String egpNeighborLoss
SendInform
public SendInform(java.lang.String propertiesFilename)
- Constructor.
- Parameters:
propertiesFilename
- The name of the properties file. Can be
null.
init
public void init()
update
public void update(java.util.Observable obs,
java.lang.Object ov)
- Implementing the Observer interface. Receiving the response from
the Inform Pdu.
- Specified by:
update
in interface java.util.Observer
- Parameters:
obs
- the OneInformPdu variableov
- the varbind- See Also:
OneInformPdu
,
varbind
,
SnmpConstants.SNMP_VAR_ENDOFMIBVIEW
main
public static void main(java.lang.String[] args)