|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.mibs.LeafSyntax
com.adventnet.snmp.mibs.JdbcLeafSyntax
class JdbcLeafSyntax
| Field Summary | |
|---|---|
(package private) byte[] |
alphaType
|
(package private) java.util.Hashtable |
enumTable
|
(package private) JdbcMibOperations |
jMibOps
|
(package private) java.util.Vector |
labelVect
|
(package private) java.lang.String |
moduleName
|
(package private) java.lang.String |
name
|
(package private) byte[] |
numericType
|
(package private) java.lang.String |
oid
|
(package private) java.lang.String |
queryString
|
(package private) java.sql.ResultSet |
rs
|
(package private) java.lang.String |
tableName
|
(package private) byte |
type
|
| Fields inherited from class com.adventnet.snmp.mibs.LeafSyntax |
|---|
equivName, MAX, MIN, node_type, range, size, syntax |
| Fields inherited from interface com.adventnet.snmp.mibs.mibparser.MIBConstants |
|---|
ACCESS_ACCESSIBLE_FOR_NOTIFY, ACCESS_NOT_ACCESSIBLE, ACCESS_NOT_IMPLEMENTED, ACCESS_READ_CREATE, ACCESS_READ_ONLY, ACCESS_READ_WRITE, ACCESS_WRITE_ONLY, accessStr, AGENT_CAPABILITIES, alphaStr, BITSTRING, COUNTER, COUNTER32, COUNTER64, GAUGE, GAUGE32, INTEGER, INTEGER32, IPADDRESS, macroStr, MODULE_COMPLIANCE, MODULE_IDENTITY, NETWORKADDRESS, NOTIFICATION_GROUP, NOTIFICATION_TYPE, NULL, numericStr, OBJECT_GROUP, OBJECT_IDENTIFIER, OBJECT_IDENTITY, OBJECT_TYPE, OCTETSTRING, OPAQUE, SEQUENCE, STATUS_CURRENT, STATUS_DEPRECATED, STATUS_MANDATORY, STATUS_OBSOLETE, STATUS_OPTIONAL, statusStr, TEXTUAL_CONVENTION, TIMETICKS, TRAP_TYPE, UNSIGNED32 |
| Constructor Summary | |
|---|---|
JdbcLeafSyntax()
|
|
JdbcLeafSyntax(java.lang.String modulename,
java.lang.String OID,
JdbcMibOperations jdbcMibOps)
|
|
| Method Summary | |
|---|---|
boolean |
checkValue(int i)
Checks whether the integer value argument is in the defined range for this syntax definition. |
boolean |
checkValue(java.lang.String s)
Checks whether the String value argument is in the defined range for this syntax definition. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
(package private) boolean |
getBITSRange(java.lang.String val)
|
java.lang.String |
getDescription()
Returns the description of the syntax. |
int[] |
getEnumint()
Gets the values for each of the enumerated integer values |
java.lang.String[] |
getEnumlabels()
Gives all the labels present for an enumerated syntax. |
(package private) void |
getEnumTable()
|
java.lang.String |
getEquivname()
Gets the equivalent SNMP type name. |
(package private) java.lang.String |
getImportedModuleName(java.lang.String modulename,
java.lang.String syntax)
|
int |
getInt(java.lang.String s)
Gets the int value of the label argument. |
java.lang.String |
getLabel(int val)
Gets the label corresponding to the integer value argument. |
long |
getMax()
Gives the maximum value allowed for the syntaxes. |
long |
getMin()
Gives the minimum value allowed for all the syntaxes. |
java.lang.String |
getName()
Returns the name of this LeafSyntax instance. |
java.lang.String[] |
getRangeItems()
Gets the range constraints available for this syntax. |
LeafSyntax |
getSyntax()
Gives the syntax for this leafSyntax Object. |
(package private) java.lang.String |
getTCDefinedMIB(java.lang.String modulename,
java.lang.String syntax)
|
(package private) byte |
getTCType(java.lang.String modulename,
java.lang.String type)
|
byte |
getType()
Retrieves the SNMP ASN.1 tag value for this syntax. |
boolean |
isConstrained()
Checks whether the syntax has some range/size limitations explicitly defined in the MIB. |
(package private) boolean |
IsConstrained()
|
boolean |
isEnumerated()
Checks whether the syntax is enumerated. |
(package private) boolean |
isImportedTC(java.lang.String tcName)
|
boolean |
isRanged()
Checks to see if this syntax has size or value limitations. |
(package private) boolean |
isTC(java.lang.String oid)
|
java.lang.String |
toString()
Returns the syntax name for display purposes. |
java.lang.String |
toTagString()
Gives the detailed description of this syntax. |
| Methods inherited from class com.adventnet.snmp.mibs.LeafSyntax |
|---|
createVariable, createvariable, createVariable, decodeInstanceString, encodeInstanceString, getBaseSyntaxName, getRange, getSize, getSnmpType, getTypeStr, initializeMINandMAXvalues, isFixedLen, isFixedLength, readType, readType, setEquivname, setMax, setMin, setName, setRange, setSize, setSyntax, setType, stringToArray |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
byte[] alphaType
byte[] numericType
java.util.Hashtable enumTable
java.sql.ResultSet rs
java.lang.String queryString
java.lang.String moduleName
java.lang.String oid
java.lang.String name
java.lang.String tableName
java.util.Vector labelVect
byte type
JdbcMibOperations jMibOps
| Constructor Detail |
|---|
JdbcLeafSyntax()
JdbcLeafSyntax(java.lang.String modulename,
java.lang.String OID,
JdbcMibOperations jdbcMibOps)
| Method Detail |
|---|
public java.lang.String getName()
LeafSyntax
getName in class LeafSyntaxpublic java.lang.String getDescription()
LeafSyntax
getDescription in class LeafSyntaxpublic byte getType()
LeafSyntax
getType in class LeafSyntax
byte getTCType(java.lang.String modulename,
java.lang.String type)
public java.lang.String[] getEnumlabels()
LeafSyntax
For example, if the syntax is INTEGER { up(1), down(2), testing(3) }
then the String array contain the following values
"up", "down" and "testing"
If you want to get a particular enumerated label, then you can
use the method getLabel(int).
The method getEnumint() can be used to get the enumerated values
available for an enumerated syntax.
getEnumlabels in class LeafSyntaxLeafSyntax.getLabel(int),
LeafSyntax.getEnumint()public int[] getEnumint()
LeafSyntax
For example, if the syntax is INTEGER { up(1), down(2), testing(3) }
then the integer array contain the following values
'1', '2' and '3'
If you want to get a particular enumerated value, then you can use
the method getInt(String).
The method getEnumlabels() can be used to get the enumerated labels
available for an enumerated syntax.
getEnumint in class LeafSyntaxLeafSyntax.getInt(java.lang.String),
#getEnumlablespublic long getMin()
LeafSyntax
For the enumerated syntaxes, returns the minimum
of the enumerated values.
For example, if the syntax is INTEGER { up(1), down(2), testing(3) }
this method will return 1.
getMin in class LeafSyntaxLeafSyntax.getMax()public long getMax()
LeafSyntax
For the enumerated syntaxes, returns the maximum
of the enumerated values.
For example, if the syntax is INTEGER { up(1), down(2), testing(3) }
this method will return 3.
getMax in class LeafSyntaxLeafSyntax.getMin()public java.lang.String toString()
LeafSyntax
toString in class LeafSyntaxLeafSyntax.getName()public java.lang.String toTagString()
LeafSyntax
toTagString in class LeafSyntaxpublic java.lang.String getLabel(int val)
LeafSyntax
getLabel in class LeafSyntaxval - the integer value which ought to be one of the enumerations.
public int getInt(java.lang.String s)
LeafSyntax
getInt in class LeafSyntaxs - the string value which should be one of the enumerations.
public boolean checkValue(int i)
LeafSyntaxIn case of enumerated syntax, if the input argument is any one of the enumerated value, then this method will return true.
For other syntaxes, if the value is between the maximum
and minimum values or if it is one of the maximum and
minimum values, then this will return true.
checkValue in class LeafSyntaxi - the integer value.
public boolean checkValue(java.lang.String s)
LeafSyntaxNOTE : This method is supposed to be used for the enumerated syntax where the input is the any one of the enumerated label. When used for any other syntaxes, this method checks whether the length of the input String argument exceeds the maximum size of the syntax.
checkValue in class LeafSyntaxs - the string value.
boolean IsConstrained()
public boolean isConstrained()
LeafSyntax
For example, if a node is defined with a syntax INTEGER, eventhough
it has a standard/default range (-2147483648 .. 2147483647), this
method will return false as there is no range constraints explicitly
imposed on the syntax in the MIB.
isConstrained in class LeafSyntaxpublic boolean isEnumerated()
LeafSyntax
isEnumerated in class LeafSyntaxpublic boolean isRanged()
LeafSyntax
By default all the basic integer types have constraints on
their values in terms of numeric ranges and hence this method
will return true for all the basic integer datatypes.
isRanged in class LeafSyntaxLeafSyntax.isEnumerated()public LeafSyntax getSyntax()
LeafSyntax
The idea is that each LeafSyntax could be a Textual-Convention.
In such a cases the textual convention's syntax will be applicable.
However if the textual convention's syntax is another textual
convention then we have a case where it should be possible to derive
the syntax tree without going into a cyclic loop.
getSyntax in class LeafSyntaxpublic java.lang.String[] getRangeItems()
LeafSyntax
getRangeItems in class LeafSyntax
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
LeafSyntax
clone in class LeafSyntaxjava.lang.CloneNotSupportedException - is thrown if the object's class
does not support the Cloneable interface.void getEnumTable()
java.lang.String getTCDefinedMIB(java.lang.String modulename,
java.lang.String syntax)
java.lang.String getImportedModuleName(java.lang.String modulename,
java.lang.String syntax)
boolean isTC(java.lang.String oid)
boolean getBITSRange(java.lang.String val)
getBITSRange in class LeafSyntaxboolean isImportedTC(java.lang.String tcName)
public java.lang.String getEquivname()
LeafSyntax
In case of MultiLevel-TC, returns the syntax of base TC.
For example, if the syntax of TC "LevelB" is "LevelA"
whose syntax is OCTET STRING,
then this method will
return OCTET STRING.
getEquivname in class LeafSyntax
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||