|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.Vector
javax.management.snmp.SnmpVarBindList
com.sun.management.snmp in
preference to classes in this package. This class may be removed
in a future version of Java DMK.
Contains a list of SnmpVarBind objects.
This class helps to create an SnmpVarBindList from a list of MIB variable names.
In addition, it contains different forms of methods which can copy or clone the list.
This list is required by any SNMP entity which specifies a list of variables to query.
| Field Summary | |
String |
identity
Deprecated. A name given to the SnmpVarBindList. |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
SnmpVarBindList()
Deprecated. Prepares an empty list. |
|
SnmpVarBindList(int initialCapacity)
Deprecated. Prepares an empty list. |
|
SnmpVarBindList(SnmpVarBindList list)
Deprecated. Similar to the copy constructor. |
|
SnmpVarBindList(String name)
Deprecated. Prepares an empty list with a String to print while debugging. |
|
SnmpVarBindList(String name,
Vector list)
Deprecated. Creates a new SnmpVarBindList object from a plain vector of SnmpVarBind objects. |
|
SnmpVarBindList(Vector list)
Deprecated. Creates a new SnmpVarBindList object from a plain vector of SnmpVarBind objects. |
|
| Method Summary | |
void |
addInstance(String inst)
Deprecated. Adds the string as an instance part to all OIDs in this list. |
void |
addVarBind(SnmpVarBind var)
Deprecated. Appends the given SnmpVarBind object to the existing SnmpVarBindList. |
void |
addVarBind(String name)
Deprecated. Creates an SnmpVarBind object from the given MIB variable and appends it to the existing
SnmpVarBindList. |
void |
addVarBind(String[] list)
Deprecated. Adds an array of MIB variable names to the list. |
void |
addVarBind(String[] list,
String inst)
Deprecated. Prepares a vector of SnmpVarBindList from an array of SNMP MIB variables and instances. |
void |
addVarBindList(SnmpVarBindList list)
Deprecated. Appends an SnmpVarBindList at the end of the current SnmpVarBindList object. |
boolean |
checkForUnspecifiedValue()
Deprecated. Returns true if there is a value that is not specified. |
boolean |
checkForValidValues()
Deprecated. Returns false if any of the variables does not contain a valid value. |
Object |
clone()
Deprecated. Clones the SnmpVarBindList. |
SnmpVarBindList |
cloneWithoutValue()
Deprecated. Clones the SnmpVarBindList. |
SnmpVarBindList |
cloneWithValue()
Deprecated. Clones the SnmpVarBindList. |
void |
concat(Vector list)
Deprecated. Adds elements in the specified SnmpVarBindList to this list. |
Timestamp |
getTimestamp()
Deprecated. Gets the timestamp associated with this SnmpVarBindList. |
SnmpVarBind |
getVarBindAt(int pos)
Deprecated. Gets an SnmpVarBind object. |
int |
getVarBindCount()
Deprecated. Gets the number of elements in this list. |
Enumeration |
getVarBindList()
Deprecated. This is a convenience function that returns an enumeration. |
int |
indexOfOid(SnmpOid oid)
Deprecated. Gives the index of an OID in the SnmpVarBindList. |
int |
indexOfOid(SnmpVarBind var)
Deprecated. Gives the index of an OID in the SnmpVarBindList. |
int |
indexOfOid(SnmpVarBind var,
int min,
int max)
Deprecated. Gives the index of an OID in the SnmpVarBindList. |
String |
oidListToString()
Deprecated. Returns a String containing the ASCII representation of all OIDs in the list. |
boolean |
removeVarBind(SnmpVarBind var)
Deprecated. Removes the given SnmpVarBind object from the existing SnmpVarBindList. |
boolean |
removeVarBind(String name)
Deprecated. Removes the SnmpVarBind object corresponding to the given MIB variable from the existing
SnmpVarBindList. |
boolean |
removeVarBind(String[] list)
Deprecated. Removes the array of SNMP MIB variables from the existing SnmpVarBindList. |
boolean |
removeVarBind(String[] list,
String inst)
Deprecated. Removes the array of SNMP MIB variables and instances from the existing SnmpVarBindList. |
boolean |
removeVarBindList(SnmpVarBindList list)
Deprecated. Removes all the SnmpVarBind objects of the given SnmpVarBindList from the existing
SnmpVarBindList. |
void |
replaceVarBind(SnmpVarBind var,
int pos)
Deprecated. Replaces an element at a specified location with the new element. |
void |
setTimestamp(Timestamp tstamp)
Deprecated. Records the sysUpTime and the actual time when this SnmpVarBindList
was changed or created. |
void |
setVarBindList(Vector list)
Deprecated. Replaces the current variable binding list of SnmpVarBind with the new specified variable binding
list of SnmpVarBind objects. |
void |
setVarBindList(Vector list,
boolean copy)
Deprecated. Replaces the current variable binding list of SnmpVarBind objects with the new variable binding
list of SnmpVarBind objects. |
SnmpVarBindList |
splitAt(int pos)
Deprecated. Splits the SnmpVarBindList. |
Vector |
toVector(boolean copy)
Deprecated. Copies the SnmpVarBindList into a plain vector of SnmpVarBind objects. |
String |
varBindListToString()
Deprecated. 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 |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Field Detail |
public String identity
SnmpVarBindList. Useful for debugging.
The default name is "VarBindList".
| Constructor Detail |
public SnmpVarBindList()
public SnmpVarBindList(int initialCapacity)
initialCapacity - The initial capacity of the SnmpVarBindList.public SnmpVarBindList(String name)
String to print while debugging.
name - The name of the newly created SnmpVarBindList.public SnmpVarBindList(SnmpVarBindList list)
list - The SnmpVarBindList to copy.public SnmpVarBindList(Vector list)
SnmpVarBindList object from a plain vector of SnmpVarBind objects.
Objects in the specified vector can be SnmpVarBind objects or derivatives.
list - The vector of SnmpVarBind objects to copy.
public SnmpVarBindList(String name,
Vector list)
SnmpVarBindList object from a plain vector of SnmpVarBind objects.
Objects in the specified vector can be SnmpVarBind objects or derivatives.
name - The name of the newly created SnmpVarBindList.list - The vector of SnmpVarBind objects to copy.| Method Detail |
public Timestamp getTimestamp()
timestamp associated with this SnmpVarBindList.
timestamp.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 final SnmpVarBind getVarBindAt(int pos)
SnmpVarBind object.
pos - The position in the list.
SnmpVarBind object at the specified position.
ArrayIndexOutOfBoundsException - If the specified pos is beyond range.public int getVarBindCount()
public Enumeration getVarBindList()
SnmpVarBind objects.public final void setVarBindList(Vector list)
SnmpVarBind with the new specified variable binding
list of SnmpVarBind objects.
This method only clones the vector. It does not clone the SnmpVarBind objects
contained in the list.
list - A vector of SnmpVarBind objects.
public final void setVarBindList(Vector list,
boolean copy)
SnmpVarBind objects with the new variable binding
list of SnmpVarBind objects.
If copy is true, it will clone each SnmpVarBind object
contained in the list.
list - A vector of SnmpVarBind objects.copy - The flag indicating whether each object in the list should be cloned.public void addVarBindList(SnmpVarBindList list)
SnmpVarBindList at the end of the current SnmpVarBindList object.
list - The SnmpVarBindList to append.public boolean removeVarBindList(SnmpVarBindList list)
SnmpVarBind objects of the given SnmpVarBindList from the existing
SnmpVarBindList.
list - The SnmpVarBindList to be removed.
true if all the SnmpVarBind objects were components of this
SnmpVarBindList, false otherwise.
public final void replaceVarBind(SnmpVarBind var,
int pos)
var - The replacement variable.pos - The location in the SnmpVarBindList.
ArrayIndexOutOfBoundsException - If the specified pos is beyond range.
public final void addVarBind(String[] list,
String inst)
throws SnmpStatusException
SnmpVarBindList from an array of SNMP MIB variables and instances.
list - An array of String containing MIB variable names.inst - A common instance for each of the MIB variables in vlist.
SnmpStatusException - An error occurred while accessing a MIB node.
public boolean removeVarBind(String[] list,
String inst)
throws SnmpStatusException
SnmpVarBindList.
list - An array of String containing MIB variable names.inst - A common instance for each of the MIB variables in vlist.
true if all the SNMP MIB variables were components of this SnmpVarBindList,
false otherwise.
SnmpStatusException - An error occurred while accessing a MIB node.
public void addVarBind(String[] list)
throws SnmpStatusException
String list[] = {"sysUpTime.0", "ifInOctets.0"}
vb.addVarBind(list);
list - The array of MIB variable names.
SnmpStatusException - An error occurred while accessing a MIB node.
public boolean removeVarBind(String[] list)
throws SnmpStatusException
SnmpVarBindList.
list - Array of strings containing MIB variable names.
true if all the SNMP MIB variables were components of this SnmpVarBindList,
false otherwise.
SnmpStatusException - An error occurred while accessing a MIB node.
public void addVarBind(String name)
throws SnmpStatusException
SnmpVarBind object from the given MIB variable and appends it to the existing
SnmpVarBindList.
It creates a new SnmpVarBindList if one did not exist.
name - A MIB variable name.
SnmpStatusException - An error occurred while accessing a MIB node.
public boolean removeVarBind(String name)
throws SnmpStatusException
SnmpVarBind object corresponding to the given MIB variable from the existing
SnmpVarBindList.
name - A MIB variable name.
true if the SNMP MIB variable was a component of this SnmpVarBindList,
false otherwise.
SnmpStatusException - An error occurred while accessing a MIB node.public void addVarBind(SnmpVarBind var)
SnmpVarBind object to the existing SnmpVarBindList.
It creates a new SnmpVarBindList if one did not exist.
var - The SnmpVarBind object to be appended.public boolean removeVarBind(SnmpVarBind var)
SnmpVarBind object from the existing SnmpVarBindList.
var - The SnmpVarBind object to be removed.
true if the SnmpVarBind object was a component of this
SnmpVarBindList, false otherwise.
public void addInstance(String inst)
throws SnmpStatusException
inst - The String to add as an instance part.
SnmpStatusException - An error occurred while accessing a MIB node.public final void concat(Vector list)
SnmpVarBindList to this list.
The elements are not cloned.
list - A vector of SnmpVarBind.public boolean checkForValidValues()
false if any of the variables does not contain a valid value.
Typically used for SnmpSet operations.
false if any of the variables does not contain a valid value, true otherwise.public boolean checkForUnspecifiedValue()
true if there is a value that is not specified.
true if there is a value that is not specified, false otherwise.public SnmpVarBindList splitAt(int pos)
SnmpVarBindList.
pos - The position at which to split the SnmpVarBindList
SnmpVarBindList list from the beginning up to the split position.
public int indexOfOid(SnmpVarBind var,
int min,
int max)
SnmpVarBindList.
The index returned must be greater than or equal to the start parameter
and smaller than the end parameter. Otherwise the method returns -1.
var - The SnmpVarBind object with the requested OID.min - The min index in SnmpVarBindList.max - The max index in SnmpVarBindList.
SnmpVarBindList.public int indexOfOid(SnmpVarBind var)
SnmpVarBindList.
var - The SnmpVarBind object with the requested OID.
SnmpVarBindList.public int indexOfOid(SnmpOid oid)
SnmpVarBindList.
oid - The SnmpOid object with the requested OID.
SnmpVarBindList.public SnmpVarBindList cloneWithValue()
SnmpVarBindList. A new copy of the SnmpVarBindList is created.
It is a real deep copy.
SnmpVarBindList clone.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 Object clone()
SnmpVarBindList. A new copy of the SnmpVarBindList is created.
It is a real deep copy.
public Vector toVector(boolean copy)
SnmpVarBindList into a plain vector of SnmpVarBind objects.
If the copy flag is false, does a shallow copy of the list. Otherwise,
individual elements will be cloned.
copy - The flag indicating whether each object in the list should be cloned.
SnmpVarBind objects.public String oidListToString()
String containing the ASCII representation of all OIDs in the list.
public String varBindListToString()
String containing details of each SnmpVarBindList (oid+value).
This is typically used in debugging.
String of all in the SnmpVarBindList.
|
FCS Release jdmk-5_1-b34.1 2005.02.10_16:46:09_MET |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||