|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--com.sun.jaw.snmp.manager.SnmpVarbindList
SnmpVarbindList contains a list of SnmpVar objects.
This class helps create a SnmpVarbindList from a list of MIB
variable names. In addition it contains methods of different form
which can copy or clone the list. This list is required by the
SnmpSession which specifies a list of variables to query.
SnmpVar,
SnmpSession, Serialized Form| Field Summary | |
java.lang.String |
identity
A name given to SnmpVarbindList. |
| Fields inherited from class java.util.Vector |
capacityIncrement,
elementCount,
elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
SnmpVarbindList()
Prepares an empty list. |
|
SnmpVarbindList(SnmpVarbindList lst)
Similar to the copy constructor. |
|
SnmpVarbindList(java.lang.String s)
Prepares an empty list with a string to print while debugging. |
|
| Method Summary | |
void |
addInstance(java.lang.String inst)
Adds the string as an instance part to all OIDs in this list. |
void |
addVarbindList(SnmpVarbindList vblst)
Appends a SnmpVarbindList at the end of the current SnmpVarbindList
object. |
void |
addVariable(SnmpVar vars)
Appends the given SnmpVar object to the existing
SnmpVarbindList. |
void |
addVariable(java.lang.String s)
Creates an SnmpVar object from the given MIB variable
and appends it to the existing SnmpVarbindList. |
void |
addVariable(java.lang.String[] vlist)
Adds an array of MIB variable names to the list. |
void |
addVariable(java.lang.String[] vlist,
java.lang.String inst)
Prepares a Vector of SnmpVarbindList
from an array of SNMP MIB variables and instances. |
boolean |
checkForUnspecifiedValue()
Returns true if there is a value that is not specified. |
boolean |
checkForValidValues()
Returns false if any of the variable does not contain a valid value. |
java.lang.Object |
clone()
Clones the SnmpVarbindList. |
SnmpVarbindList |
cloneWithoutValue()
Clones the SnmpVarbindList. |
SnmpVarbindList |
cloneWithValue()
Clones the SnmpVarbindList. |
void |
concat(java.util.Vector list)
Adds elements in the specified SnmpVarbindList to this list. |
void |
finalize()
Removes all the elements from the SnmpVarbindList object. |
SnmpVar |
getSnmpVarAt(int pos)
Gets an SnmpVar object. |
Timestamp |
getTimestamp()
Gets the timestamp associated with this SnmpVarbindList. |
java.util.Enumeration |
getVarbindEnumeration()
This is a convenience function that returns an enumeration. |
int |
getVariableCount()
Gets the number of elements in this list. |
int |
indexOfOid(SnmpOid oidarg)
Gives the index of an OID in the SnmpVarbindList. |
int |
indexOfOid(SnmpVar svar)
Gives the index of an OID in the SnmpVarbindList. |
int |
indexOfOid(SnmpVar svar,
int start,
int end)
Gives the index of an OID in the SnmpVarbindList. |
java.lang.String |
oidListToString()
Returns a string containing the ASCII representation of all OIDs in the list. |
boolean |
removeVarbindList(SnmpVarbindList vblst)
Removes all the SnmpVar objects of the given SnmpVarbindList
from the existing SnmpVarbindList. |
boolean |
removeVariable(SnmpVar vars)
Removes the given SnmpVar object from the existing SnmpVarbindList. |
boolean |
removeVariable(java.lang.String s)
Removes the SnmpVar object corresponding to the given MIB variable
from the existing SnmpVarbindList. |
boolean |
removeVariable(java.lang.String[] vlist)
Removes the array of SNMP MIB variables from the existing SnmpVarbindList. |
boolean |
removeVariable(java.lang.String[] vlist,
java.lang.String inst)
Removes the array of SNMP MIB variables and instances from the existing SnmpVarbindList. |
void |
replaceVariable(SnmpVar newvar,
int pos)
Replaces an element at specified location with the new element. |
void |
setTimestamp(Timestamp tstamp)
Records the sysUpTime and the actual time when this
SnmpVarbindList was changed or created. |
void |
setVarbindList(java.util.Vector list)
Replaces the current list of varbinds with the new varbind. |
void |
setVarbindList(java.util.Vector list,
boolean copy)
Replaces the current list of varbinds with the new varbind specified. |
SnmpVarbindList |
splitAt(int atPosition)
Splits the SnmpVarbindList. |
java.lang.String |
vbListToString()
Constructs a string containing details of each SnmpVarbindList
(oid+value). |
| Methods inherited from class java.util.Vector |
add,
add,
addAll,
addAll,
addElement,
capacity,
clear,
contains,
containsAll,
copyInto,
elementAt,
elements,
ensureCapacity,
equals,
firstElement,
get,
hashCode,
indexOf,
indexOf,
insertElementAt,
isEmpty,
lastElement,
lastIndexOf,
lastIndexOf,
remove,
remove,
removeAll,
removeAllElements,
removeElement,
removeElementAt,
removeRange,
retainAll,
set,
setElementAt,
setSize,
size,
subList,
toArray,
toArray,
toString,
trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator,
listIterator,
listIterator |
| Methods inherited from class java.lang.Object |
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public java.lang.String identity
SnmpVarbindList. Useful for debugging.
The default name is "VarbindList".| Constructor Detail |
public SnmpVarbindList()
public SnmpVarbindList(java.lang.String s)
s - The name of the new created SnmpVarbindList.public SnmpVarbindList(SnmpVarbindList lst)
lst - The SnmpVarbindList to copy.| Method Detail |
public void setTimestamp(Timestamp tstamp)
sysUpTime and the actual time when this
SnmpVarbindList was changed or created. This needs
to be set explicitly.tstamp - The SnmpTimestamp of the device for which the values hold true.public Timestamp getTimestamp()
timestamp associated with this SnmpVarbindList.timestamp.public final SnmpVar getSnmpVarAt(int pos)
SnmpVar object.pos - The position in list.SnmpVar object at the specified position.public int getVariableCount()
public java.util.Enumeration getVarbindEnumeration()
SnmpVarbindList.Enumerationpublic java.lang.String oidListToString()
public java.lang.String vbListToString()
SnmpVarbindList
(oid+value). This is used typically in debugging.SnmpVarbindList.public final void setVarbindList(java.util.Vector list)
SnmpVar object contained in the list.list - A vector of SnmpVar.SnmpVar,
SnmpSessionpublic final void concat(java.util.Vector list)
SnmpVarbindList to this list.
The elements are not cloned.list - A vector of SnmpVar.
public final void setVarbindList(java.util.Vector list,
boolean copy)
copy is true, it will clone each SnmpVar object
contained in the list.list - A vector of SnmpVar.copy - The flag indicating whether each object in the
list should be cloned.SnmpVar,
SnmpSession
public final void replaceVariable(SnmpVar newvar,
int pos)
newvar - The replacement variable.pos - The location in the SnmpVarbindList.
public final void addVariable(java.lang.String[] vlist,
java.lang.String inst)
throws SnmpStatusException
SnmpVarbindList
from an array of SNMP MIB variables and instances.
It does not affect the session at all (to be moved to a different class).vlist - An array of String containing MIB variable names.inst - A common instance for each of the MIB variable in vlist.SnmpVar
public boolean removeVariable(java.lang.String[] vlist,
java.lang.String inst)
throws SnmpStatusException
SnmpVarbindList.vlist - An array of String containing MIB variable names.inst - A common instance for each of the MIB variable in vlist.SnmpVarbindList;
false otherwise.SnmpVar
public void addVariable(java.lang.String[] vlist)
throws SnmpStatusException
String mylist[] = {"sysUpTime.0", "ifInOctets.0"}
vb.addVariable(mylist) ;
vlist - The array of MIB variables names.SnmpVar
public boolean removeVariable(java.lang.String[] vlist)
throws SnmpStatusException
SnmpVarbindList.vlist - Array of String containing MIB variable names.SnmpVarbindList;
false otherwise.SnmpVarpublic void addVariable(SnmpVar vars)
SnmpVar object to the existing
SnmpVarbindList.
It creates a new SnmpVarbindList if it did not exist.vars - The SnmpVar object to be appended.SnmpVarpublic boolean removeVariable(SnmpVar vars)
SnmpVar object from the existing SnmpVarbindList.vars - The SnmpVar object to be removed.SnmpVar object was a component of this SnmpVarbindList;
false otherwise.SnmpVar
public void addVariable(java.lang.String s)
throws SnmpStatusException
SnmpVar object from the given MIB variable
and appends it to the existing SnmpVarbindList.
It creates a new SnmpVarbindList if it did not exist.s - A MIB variable name.SnmpVar
public boolean removeVariable(java.lang.String s)
throws SnmpStatusException
SnmpVar object corresponding to the given MIB variable
from the existing SnmpVarbindList.s - A MIB variable name.SnmpVarbindList;
false otherwise.SnmpVar
public void addInstance(java.lang.String inst)
throws SnmpStatusException
inst - The string to add as an instance part.public SnmpVarbindList splitAt(int atPosition)
SnmpVarbindList.atposition - The position to split the SnmpVarbindListSnmpVarbindList list from the beginning up to the split position.
public int indexOfOid(SnmpVar svar,
int start,
int end)
SnmpVarbindList.
The index returned must be greater than or equal to the start parameter
and smaller than end parameter. Otherwise the method returns -1.svar - The SnmpVar object with the requested OID.start - The min index in SnmpVarbindList.end - The max index in SnmpVarbindList.SnmpVarbindList.public int indexOfOid(SnmpVar svar)
SnmpVarbindList.svar - The SnmpVar object with the requested OID.SnmpVarbindList.public int indexOfOid(SnmpOid oidarg)
SnmpVarbindList.oidarg - The SnmpOid object with the requested OID.SnmpVarbindList.public boolean checkForValidValues()
SnmpSet operations.public boolean checkForUnspecifiedValue()
public void addVarbindList(SnmpVarbindList vblst)
SnmpVarbindList at the end of the current SnmpVarbindList
object.vblst - The SnmpVarbindList to append.public boolean removeVarbindList(SnmpVarbindList vblst)
SnmpVar objects of the given SnmpVarbindList
from the existing SnmpVarbindList.vblst - The SnmpVarbindList to be removed.SnmpVar objects were components of this SnmpVarbindList;
false otherwise.SnmpVarpublic void finalize()
SnmpVarbindList object.public SnmpVarbindList cloneWithoutValue()
SnmpVarbindList. It does not clone the value part
of the variable. It is a deep copy (except for the value portion).SnmpVarbindList clone.public java.lang.Object clone()
SnmpVarbindList. A new copy of the SnmpVarbindList is created.
It is a real deep copy.Object clone.public SnmpVarbindList cloneWithValue()
SnmpVarbindList. A new copy of the SnmpVarbindList is created.
It is a real deep copy.SnmpVarbindList clone.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||