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.snmp.pdu
Class PassiveTrapPduv2

    java.lang.Object
      |
      +--java.util.Observable
            |
            +--uk.co.westhawk.snmp.stack.Pdu
                  |
                  +--uk.co.westhawk.snmp.stack.TrapPduv2
                        |
                        +--uk.co.westhawk.snmp.pdu.PassiveTrapPduv2

public class PassiveTrapPduv2
extends TrapPduv2

This class represents the ASN SNMP v2c (and higher) Trap PDU object that does not create a thread to send itself. It must be used with the context class PassiveSnmpContextv2c. The original purpose of the Passive classes is to allow the stack to be used in environments where thread creation is unwanted, eg database JVMs such as Oracle JServer. See SNMPv2-PDU.

See notes on how to send traps in an Oracle JServer environment.

Since:
  4_12
Version:
  $Revision: 3.8 $ $Date: 2006/03/23 14:54:09 $
Author:
  Mike Waters, ERG Group
See Also:
  `PassiveTrapPduv1`

Field Summary

Fields inherited from class uk.co.westhawk.snmp.stack.Pdu
`added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds, snmpv3MsgId`

Constructor Summary
`PassiveTrapPduv2(PassiveSnmpContextv2c con)` Constructor.

Method Summary
`void` | `addToTrans()` Override of the operation in PDU.

Methods inherited from class uk.co.westhawk.snmp.stack.TrapPduv2
`isExpectingResponse, new_value, tell_them, toString`

Methods inherited from class uk.co.westhawk.snmp.stack.Pdu
`addOid, addOid, addOid, addOid, addOid, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, isTimedOut, notifyObservers, printVars, send, send, send, sendme, setErrorIndex, setErrorStatus, setErrorStatus, setMsgType, setRetryIntervals, toString, waitForSelf`

Methods inherited from class java.util.Observable
`addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged`

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

Constructor Detail

### PassiveTrapPduv2

    public PassiveTrapPduv2(PassiveSnmpContextv2c con)

  Constructor.

Parameters:
  `con` - The context (v2c) of the PDU. This is of type PassiveSnmpContextv2c to ensure that the correct threading behaviour occurs.

Method Detail

### addToTrans

    public void addToTrans()

  Override of the operation in PDU. Send the trap in the callers thread. That is, don't create a sending thread or add it to a queue or anything, just go straight to the socket.

  Overrides:
    `addToTrans` in class `Pdu`
  See Also:
    `Pdu.send()`

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