Package 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
This class represents the SNMP GetBulk Pdu. This request has been
added in SNMPv2c, hence is not supported by SNMPv1 agents.
The request is processed on the agent side in the following way:
// getNext (once) on the non_repeaters for (n=0; n<N; n++) { getNext(var[n]); } // getNext (max_repetitions times) on the repeaters for (m=1; m<M; m++) { for (r=1; r<R; r++) { getNext(var[N+r]); } }
Where:
L
is the number of vars in the requestN = Max(Min(non_repeaters, L), 0)
M = Max(max_repetitions, 0)
R = L-N
- Version:
- $Revision: 3.17 $ $Date: 2006/02/09 14:30:19 $
- Author:
- Birgit Arkesteijn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the max_repetitions.int
Returns the non_repeaters.boolean
send()
Sends the Pdu.void
setMaxRepetitions
(int no) Sets the max_repetitions.void
setMaxRepititions
(int no) Deprecated.void
setNonRepeaters
(int no) Sets the non_repeaters.toString()
Returns a string representation of the object.Methods inherited from class uk.co.westhawk.snmp.stack.Pdu
addOid, addOid, addOid, addOid, addOid, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, getRetryIntervals, isTimedOut, notifyObservers, send, setRetryIntervals, waitForSelf
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers
-
Constructor Details
-
GetBulkPdu
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 (v2c or v3) of the Pdu
-
-
Method Details
-
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.Old method to set the max_repetitions. Was a spelling mistake, it is still in here for backwards compatibility.- See Also:
-
getMaxRepetitions
public int getMaxRepetitions()Returns the max_repetitions. -
send
Sends 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 classPdu
- Throws:
IOException
PduException
- See Also:
-
Pdu.send(int, int)
-
toString
Returns a string representation of the object.
-
setMaxRepetitions(int no)
.