Package org.opennms.protocols.snmp
Class SnmpPduBulk
- java.lang.Object
-
- org.opennms.protocols.snmp.SnmpPduPacket
-
- org.opennms.protocols.snmp.SnmpPduBulk
-
- All Implemented Interfaces:
java.lang.Cloneable
,SnmpSyntax
public class SnmpPduBulk extends SnmpPduPacket
This class defines the SNMPv2 GetBulk request sent from the management platform to the agent. The Get Bulk request is designed to minimize the number of message exchanges to get a large amount of information. The Get Bulk works in the same way as multiple Get Next requests would work. It returns a set of lexicograpical successors that are selected. For more information on the use of a GetBulk request see [Stallings99] page 378-383.- Author:
- Brian Weaver
-
-
Field Summary
-
Fields inherited from class org.opennms.protocols.snmp.SnmpPduPacket
ErrAuthorizationError, ErrBadValue, ErrCommitFailed, ErrGenError, ErrInconsistentName, ErrInconsistentValue, ErrNoAccess, ErrNoCreation, ErrNoError, ErrNoSuchName, ErrNotWritable, ErrReadOnly, ErrResourceUnavailable, ErrTooBig, ErrUndoFailed, ErrWrongEncoding, ErrWrongLength, ErrWrongType, ErrWrongValue, GET, GETBULK, GETNEXT, INFORM, m_errIndex, m_errStatus, REPORT, RESPONSE, SET, V2TRAP
-
-
Constructor Summary
Constructors Constructor Description SnmpPduBulk()
Constructs a default get bulk request.SnmpPduBulk(int nonRepeaters, int maxRepititions, SnmpVarBind[] vars)
Constructs a get bulk request with the specified variables, non-repeaters, and maximum repititions.SnmpPduBulk(SnmpPduBulk second)
Constructs a duplicate get bulk request that is an identical copy of the passed object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Creates a new duplicate object of self that shares no references with the original PDU.SnmpSyntax
duplicate()
Creates a new duplicate object of self that shares no references with the original PDU.int
getMaxRepititions()
Used to retreive the number of reptitions to get for the repeating variables.int
getNonRepeaters()
Returns the number of non-repeating elementsvoid
setMaxRepititions(int maxreps)
Used to set the number of maximum repititions to be collected by the PDU.void
setNonRepeaters(int nonreps)
Sets the number of non-repeating elements in this PDU.-
Methods inherited from class org.opennms.protocols.snmp.SnmpPduPacket
addVarBind, addVarBindAt, decodeASN, encodeASN, getCommand, getLength, getPeer, getRequestId, getVarBindAt, nextSequence, removeVarBindAt, setCommand, setPeer, setRequestId, setVarBindAt, toVarBindArray, typeId
-
-
-
-
Constructor Detail
-
SnmpPduBulk
public SnmpPduBulk()
Constructs a default get bulk request.
-
SnmpPduBulk
public SnmpPduBulk(SnmpPduBulk second)
Constructs a duplicate get bulk request that is an identical copy of the passed object.- Parameters:
second
- The object to copy.
-
SnmpPduBulk
public SnmpPduBulk(int nonRepeaters, int maxRepititions, SnmpVarBind[] vars)
Constructs a get bulk request with the specified variables, non-repeaters, and maximum repititions.- Parameters:
nonRepeaters
- The number of non-repeating variablesmaxRepititions
- The number of "repeating" variables to getvars
- The SNMP variables
-
-
Method Detail
-
getNonRepeaters
public int getNonRepeaters()
Returns the number of non-repeating elements- Returns:
- The non-repeating value
-
setNonRepeaters
public void setNonRepeaters(int nonreps)
Sets the number of non-repeating elements in this PDU.- Parameters:
nonreps
- The number of non-repeaters
-
getMaxRepititions
public int getMaxRepititions()
Used to retreive the number of reptitions to get for the repeating variables.- Returns:
- The number of maximum reptitions.
-
setMaxRepititions
public void setMaxRepititions(int maxreps)
Used to set the number of maximum repititions to be collected by the PDU.- Parameters:
maxreps
- The maximum number of repititions
-
duplicate
public SnmpSyntax duplicate()
Creates a new duplicate object of self that shares no references with the original PDU.- Specified by:
duplicate
in interfaceSnmpSyntax
- Specified by:
duplicate
in classSnmpPduPacket
- Returns:
- A newly created copy of self.
-
clone
public java.lang.Object clone()
Creates a new duplicate object of self that shares no references with the original PDU.- Specified by:
clone
in classSnmpPduPacket
- Returns:
- A newly created copy of self.
-
-