public class SendTrap
extends java.lang.Object
The SendTrap application sends a PassiveTrapPduv2 in an Oracle JServ environment.
The host, port, oid, community name, etc, are passed by the Oracle trigger to the method.
See notes on how to send traps in an Oracle JServer environment.
PassiveTrapPduv2
,
PassiveSnmpContextv2c
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
authenticationFailure |
static java.lang.String |
coldStart |
static java.lang.String |
egpNeighborLoss |
static java.lang.String |
linkDown |
static java.lang.String |
linkUp |
static java.lang.String |
snmpTrapOID |
static java.lang.String |
sysUpTime |
static java.lang.String |
warmStart |
Constructor and Description |
---|
SendTrap() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
doSendTrap(java.lang.String host,
int port,
java.lang.String comm,
long upTime,
java.lang.String trapOid)
Sends one v2c trap.
|
public static final java.lang.String sysUpTime
public static final java.lang.String snmpTrapOID
public static final java.lang.String coldStart
public static final java.lang.String warmStart
public static final java.lang.String linkDown
public static final java.lang.String linkUp
public static final java.lang.String authenticationFailure
public static final java.lang.String egpNeighborLoss
public static java.lang.String doSendTrap(java.lang.String host, int port, java.lang.String comm, long upTime, java.lang.String trapOid)
The parameters are passed via the Oracle trigger; they are the insert values of the scott.trap table.
host
- The hostnameport
- The port number, usually 162comm
- The community nameupTime
- The value for sysUpTime.0trapOid
- The value for snmpTrapOID.0OK
, if all went well,
an error message if not. This value will be stored in the
scott.trap.result field.