Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 4_12
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.co.westhawk.snmp.pdu
Class DiscoveryPdu

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

public class DiscoveryPdu
extends Pdu

This class is used to perform the SNMPv3 USM discovery. This Pdu cannot have any OIDs.

Version:
  $Revision: 3.10 $ $Date: 2002/10/23 09:56:20 $
Author:
  Birgit Arkesteijn

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

Constructor Summary
`DiscoveryPdu(SnmpContextv3Face cntxt)` Constructor.

Method Summary
`void` | `addOid(AsnObjectId oid)` Cannot add any OID.
`void` | `addOid(AsnObjectId oid, AsnObject val)` Cannot add any OID.
`void` | `addOid(java.lang.String oid)` Cannot add any OID.
`void` | `addOid(java.lang.String oid, AsnObject val)` Cannot add any OID.
`void` | `addOid(varbind var)` Cannot add any OID.
`protected void` | `new_value(int n, varbind a_var)` The value of the request is set.
`boolean` | `send()` Send the Pdu.
`protected void` | `tell_them()` The methods notifies all observers.

Methods inherited from class uk.co.westhawk.snmp.stack.Pdu
`addToTrans, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, isTimedOut, notifyObservers, send, send, sendme, setErrorIndex, setErrorStatus, setErrorStatus, setMsgType, setRetryIntervals, toString, 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

### DiscoveryPdu

    public DiscoveryPdu(SnmpContextv3Face cntxt)

  Constructor.
  Parameters:
    `context` - The v3 context of the Pdu

Method Detail

### addOid

    public void addOid(java.lang.String oid)
                throws java.lang.IllegalArgumentException

  Cannot add any OID. This method is overwritten to prevent users from adding any OID.
  Overrides:
    `addOid` in class `Pdu`
  Throws:
    `java.lang.IllegalArgumentException` - A discovery Pdu cannot have any OID.

### addOid

    public void addOid(java.lang.String oid,
                       AsnObject val)

  Cannot add any OID. This method is overwritten to prevent users from adding any OID.
  Overrides:
    `addOid` in class `Pdu`
  Throws:
    `java.lang.IllegalArgumentException` - A discovery Pdu cannot have any OID.
  Since:
    4_12

### addOid

    public void addOid(AsnObjectId oid,
                       AsnObject val)

  Cannot add any OID. This method is overwritten to prevent users from adding any OID.
  Overrides:
    `addOid` in class `Pdu`
  Throws:
    `java.lang.IllegalArgumentException` - A discovery Pdu cannot have any OID.
  Since:
    4_12

### addOid

    public void addOid(varbind var)
                throws java.lang.IllegalArgumentException

  Cannot add any OID. This method is overwritten to prevent users from adding any OID.
  Overrides:
    `addOid` in class `Pdu`
  Throws:
    `java.lang.IllegalArgumentException` - A discovery Pdu cannot have any OID.

### addOid

    public void addOid(AsnObjectId oid)

  Cannot add any OID. This method is overwritten to prevent users from adding any OID.
  Overrides:
    `addOid` in class `Pdu`
  Throws:
    `java.lang.IllegalArgumentException` - A discovery Pdu cannot have any OID.
  Since:
    4_12

### send

    public boolean send()
                 throws java.io.IOException,
                        PduException

  Send the Pdu. Note that all properties of the context have to be set before this point.
  Overrides:
    `send` in class `Pdu`

### new_value

    protected void new_value(int n,
                             varbind a_var)

  The value of the request is set. This will be called by Pdu.fillin().
  Overrides:
    `new_value` in class `Pdu`
  See Also:
    `Pdu.new_value(int, uk.co.westhawk.snmp.stack.varbind)`

### tell_them

    protected void tell_them()

  The methods notifies all observers. This will be called by Pdu.fillin().

  If no exception occurred whilst receiving the response, the Object to the update() method of the Observer will be an array of varbinds, so they may contains any AsnObject type. If an exception occurred, that exception will be passed as the Object to the update() method.

  Overrides:
    `tell_them` in class `Pdu`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SNMP Stack 4_12
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD