Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.nothread.trap
Class SendTrap

    java.lang.Object
      |
      +--uk.co.westhawk.nothread.trap.SendTrap

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.

Version:
  $Revision: 1.3 $ $Date: 2006/01/17 17:43:54 $
Author:
  Birgit Arkesteijn
See Also:
  `PassiveTrapPduv2`, `PassiveSnmpContextv2c`

Field Summary
`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 Summary
`SendTrap()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sysUpTime

    public static final java.lang.String sysUpTime

See Also:
  Constant Field Values

### snmpTrapOID

    public static final java.lang.String snmpTrapOID

See Also:
  Constant Field Values

### coldStart

    public static final java.lang.String coldStart

See Also:
  Constant Field Values

### warmStart

    public static final java.lang.String warmStart

See Also:
  Constant Field Values

### linkDown

    public static final java.lang.String linkDown

See Also:
  Constant Field Values

### linkUp

    public static final java.lang.String linkUp

See Also:
  Constant Field Values

### authenticationFailure

    public static final java.lang.String authenticationFailure

See Also:
  Constant Field Values

### egpNeighborLoss

    public static final java.lang.String egpNeighborLoss

See Also:
  Constant Field Values

Constructor Detail

### SendTrap

    public SendTrap()

Method Detail

### doSendTrap

    public 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. One can only call static methods from within Oracle. Sad, but true.

  The parameters are passed via the Oracle trigger; they are the insert values of the scott.trap table.

  Parameters:
    `host` - The hostname
    `port` - The port number, usually 162
    `comm` - The community name
    `upTime` - The value for sysUpTime.0
    `trapOid` - The value for snmpTrapOID.0
  Returns:
    The result of the send. `OK`, if all went well, an error message if not. This value will be stored in the scott.trap.result field.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 5_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD