|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PDU
A protocol data unit (PDU) is the basic unit of information exchange between two SNMP protocol entities. It consists of a type, a list of VariableBindings, and error indicators. Since the script API of MIB Explorer does only support synchronous requests, a request ID is not part of this PDU class.
Method Summary | |
---|---|
void |
appendNullVariable(java.lang.String oid)
Appends a variable binding to the PDU with a Null value. |
VariableBinding |
appendVariable(java.lang.String oid)
Appends a variable binding to the PDU. |
PDU |
getSubPDU(int fromIndex,
int maxLength)
Gets a new PDU object from this one with a subset of its variable bindings. |
VariableBinding |
getVariableByOid(java.lang.String oid)
Gets the first VariableBinding instance of the PDU whose OID matches the given OID. |
java.util.Vector |
getVariables()
Gets the variable bindings of the PDU. |
boolean |
saveToFile(java.lang.String path)
Saves this PDU instance as a file under the specified name. |
void |
setMaxRepetitions(int maxRepetitions)
Sets the number of maximum repetitions for GETBULK requests. |
void |
setNonRepeaters(int nonRepeaters)
Sets the number of non repeaters of GETBULK requests. |
Method Detail |
---|
java.util.Vector getVariables()
VariableBinding getVariableByOid(java.lang.String oid)
oid
- a String representing an OID as dotted String. The first subidentifier
may denote an object name - all other subidentifiers have to be
numerical.
Examples: "ifAdminStatus.2", "1.3.6.1.2.1.2.2.1.7",
"atmVclAdminStatus.1.0.64"
null
otherwise.VariableBinding appendVariable(java.lang.String oid)
oid
- a String representing an OID as dotted String. The first subidentifier
may denote an object name - all other subidentifiers have to be
numerical.
oid
denotes an OBJECT-TYPE definition that can
be found in the currently loaded MIB modules. Otherwise, null
is returned.void appendNullVariable(java.lang.String oid)
oid
- a String representing an OID as dotted String. The first subidentifier
may denote an object name - all other subidentifiers have to be
numerical.boolean saveToFile(java.lang.String path)
PDU
instance as a file under the specified name.
If you want to save this PDU relative to the current PDU search directory
then prepend the string returned by Snmp.getPduDirectory()
) to
path
.
path
- the file path under which this PDU is saved.
true
when saving the PDU was successful, false
otherwise.void setMaxRepetitions(int maxRepetitions)
maxRepetitions
- an integer value > 0.void setNonRepeaters(int nonRepeaters)
nonRepeaters
- an integer value > 0.PDU getSubPDU(int fromIndex, int maxLength)
fromIndex
- the first variable binding to include in the new PDU (starting from 0).maxLength
- the number of variable bindings to include in the new PDU.
fromIndex
is less than the number
of VBs in this PDU. The number of VBs in the returned PDU is then
greater than one and less or equal length
. If the number
of VBs in the returned PDU would be zero null
will be
returned.
|
Copyright 2003-2011, Frank Fock, All Rights Reserved. http://www.mibexplorer.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |