| |
|
| java.lang.Object org.snmp4j.agent.mo.MOTableIndex
MOTableIndex | public class MOTableIndex implements MOTableIndexValidator(Code) | | The MOTableIndex class represents a index definition of a
conceptual table. An index always has to implement also the
MOTableIndexValidator interface for validation of index values
for newly created rows.
author: Frank Fock version: 1.0 |
Constructor Summary | |
public | MOTableIndex(MOTableSubIndex[] subIndexes) Creates a index definition from an array of sub-index definitions. | public | MOTableIndex(MOTableSubIndex[] subIndexes, boolean impliedLength) Creates a index definition from an array of sub-index definitions where
the last sub-index may have an implied length. | public | MOTableIndex(MOTableSubIndex[] subIndexes, boolean impliedLength, MOTableIndexValidator validator) Creates a index definition from an array of sub-index definitions where
the last sub-index may have an implied length. |
MAX_INDEX_OID_LENGTH | final public static int MAX_INDEX_OID_LENGTH(Code) | | |
MOTableIndex | public MOTableIndex(MOTableSubIndex[] subIndexes)(Code) | | Creates a index definition from an array of sub-index definitions.
Parameters: subIndexes - an array of sub-index definitions with at least one element. |
MOTableIndex | public MOTableIndex(MOTableSubIndex[] subIndexes, boolean impliedLength)(Code) | | Creates a index definition from an array of sub-index definitions where
the last sub-index may have an implied length.
Parameters: subIndexes - an array of sub-index definitions with at least one element. Parameters: impliedLength - if true the last sub-index has an implied length if at hasa variable length at all. |
MOTableIndex | public MOTableIndex(MOTableSubIndex[] subIndexes, boolean impliedLength, MOTableIndexValidator validator)(Code) | | Creates a index definition from an array of sub-index definitions where
the last sub-index may have an implied length.
Parameters: subIndexes - an array of sub-index definitions with at least one element. Parameters: impliedLength - if true the last sub-index has an implied length if at hasa variable length at all. Parameters: validator - an index validator that is called whenever a new index value needs tovalidated. |
getIndex | public MOTableSubIndex getIndex(int index)(Code) | | Gets the sub-index definition at the specified index.
Parameters: index - a valid sub-index index (zero-based).the MOTableSubIndex . |
getIndexOID | public OID getIndexOID(Variable[] indexValues)(Code) | | Gets the index OID from an array of index values.
Parameters: indexValues - an array of Variable instances that has to match the number and typeof sub-indexes in this index.the corresponding index OID. See Also: MOTableIndex.getIndexValues |
getIndexOIDs | public OID[] getIndexOIDs(OID index)(Code) | | Split a table index into an array of object IDs each representing the
value of its corresponding index object. For example if a table's index
would be defined as INDEX { ifIndex, ipAddress } and the index given
would be "1.127.0.0.1" the resulting array would be { "1", "127.0.0.1" }
Parameters: index - an OID denoting a table's index value.an array of OID instances with the same size as returned byMOTableIndex.size. If the given index is not a valid object IDnull is returned. |
getIndexValues | public Variable[] getIndexValues(OID index)(Code) | | Gets the index values contained in an index OID.
Parameters: index - the index OID.an array of values representing the index. See Also: MOTableIndex.getIndexOID |
getValidator | public MOTableIndexValidator getValidator()(Code) | | Gets the index validator (if present).
the MOTableIndexValidator associated with this index ornull . |
isImpliedLength | public boolean isImpliedLength()(Code) | | |
isValidIndex | public boolean isValidIndex(OID index)(Code) | | Checks whether an index OID is a valid index for this index definition
or not.
Parameters: index - an OID (possibly zero length).true if the index is valid or false otherwise. |
setValidator | public void setValidator(MOTableIndexValidator validator)(Code) | | Sets the index validator associated with this index definition.
Parameters: validator - a MOTableIndexValidator instance. |
size | public int size()(Code) | | Gets the number of sub-index definitions in this index definition.
the sub-index count. |
|
|
|