SNMP Stack 4_12

uk.co.westhawk.snmp.stack
Class GetBulkPdu

java.lang.Object
  |
  +--java.util.Observable
        |
        +--uk.co.westhawk.snmp.stack.Pdu
              |
              +--uk.co.westhawk.snmp.stack.GetBulkPdu
Direct Known Subclasses:
OneGetBulkPdu

public abstract class GetBulkPdu
extends Pdu

This class represents the SNMP GetBulk Pdu.

The request is processed on the agent site in the following way:

 for (n=0; n<N; n++)
 {
    getValue(var[n]);
 }
 for (m=1; m<M; m++)
 {
     for (r=1; r<R; r++)
     {
         getValue(var[N+r]);
     }
 }
 

Where:

Version:
$Revision: 3.14 $ $Date: 2002/10/10 15:13:57 $
Author:
Birgit Arkesteijn

Field Summary
protected  int max_repetitions
           
protected  int non_repeaters
           
 
Fields inherited from class uk.co.westhawk.snmp.stack.Pdu
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds
 
Constructor Summary
GetBulkPdu(SnmpContextBasisFace con)
          Constructor.
 
Method Summary
 int getMaxRepetitions()
          Returns the max_repetitions.
 int getNonRepeaters()
          Returns the non_repeaters.
 boolean send()
          Send the Pdu.
 void setMaxRepetitions(int no)
          Sets the max_repetitions.
 void setMaxRepititions(int no)
          Deprecated. Use setMaxRepetitions(int no).
 void setNonRepeaters(int no)
          Sets the non_repeaters.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class uk.co.westhawk.snmp.stack.Pdu
addOid, addOid, addOid, addOid, addOid, addToTrans, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, isTimedOut, new_value, notifyObservers, send, send, sendme, setErrorIndex, setErrorStatus, setErrorStatus, setMsgType, setRetryIntervals, tell_them, 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
 

Field Detail

non_repeaters

protected int non_repeaters

max_repetitions

protected int max_repetitions
Constructor Detail

GetBulkPdu

public GetBulkPdu(SnmpContextBasisFace con)
Constructor. The GetBulkRequest has been added in SNMPv2. Its purpose is to retrieve a large amount of information with one request.
Parameters:
con - The context of the Pdu
Method Detail

setNonRepeaters

public void setNonRepeaters(int no)
Sets the non_repeaters. The non_repeaters specifies the number of variables in the varbind list for which a single lexicographic successor is to be returned. If they are not set, the value will be 0 (zero).

getNonRepeaters

public int getNonRepeaters()
Returns the non_repeaters.

setMaxRepetitions

public void setMaxRepetitions(int no)
Sets the max_repetitions. The max_repetitions specifies the number of lexicographic successors to be returned for the remaining variables in the varbind list. If they are not set, the value will be 0 (zero).

setMaxRepititions

public void setMaxRepititions(int no)
Deprecated. Use setMaxRepetitions(int no).

Old method to set the max_repetitions. Was a spelling mistake, it is still in here for backwards compatibility.
See Also:
setMaxRepetitions(int)

getMaxRepetitions

public int getMaxRepetitions()
Returns the max_repetitions.

send

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

The GetBulk request has the same format as any other request, except that the error_status field is replaced by non_repeaters and the error_index field is replaces by max_repetitions.

Overrides:
send in class Pdu
See Also:
Pdu.send(int, int)

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class Pdu
Returns:
The string

SNMP Stack 4_12