|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.adventnet.snmp.mibs.LeafSyntax
|
+--com.adventnet.snmp.mibs.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,
name,
node_type,
range,
size,
syntax,
type |
| 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 | |
(package private) |
JdbcLeafSyntax()
|
(package private) |
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()
Gives all the values present for an enumerated syntax. |
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 |
|
| 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()
public java.lang.String getDescription()
public byte getType()
The following table lists the syntax, corresponding tag values and the equivalent SnmpAPI types.
| Syntax | TagValue | equivalent SnmpAPI types |
| INTEGER/Integer32 | 0x02 | SnmpAPI.INTEGER |
| OCTET STRING/BITS | 0x04 | SnmpAPI.STRING |
| NULL | 0x05 | SnmpAPI.NULL |
| OBJECT IDENTIFIER | 0x06 | SnmpAPI.OBJID |
| IpAddress | 0x40 | SnmpAPI.IPADDRESS |
| NetworkAddress | 0x40 | SnmpAPI.NETWORKADDRESS |
| Counter/Counter32 | 0x41 | SnmpAPI.COUNTER |
| Unsigned32 | 0x42 | SnmpAPI.UNSIGNED32 |
| Gauge/Gauge32 | 0x42 | SnmpAPI.GAUGE |
| TimeTicks | 0x43 | SnmpAPI.TIMETICKS |
| Opaque | 0x44 | SnmpAPI.OPAQUE |
| Counter64 | 0x46 | SnmpAPI.COUNTER64 |
byte getTCType(java.lang.String modulename,
java.lang.String type)
public java.lang.String[] getEnumlabels()
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.
LeafSyntax.getLabel(int),
LeafSyntax.getEnumint()public int[] getEnumint()
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.
LeafSyntax.getInt(java.lang.String),
#getEnumlablespublic long getMin()
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.
LeafSyntax.getMax()public long getMax()
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.
LeafSyntax.getMin()public java.lang.String toString()
LeafSyntax.getName()public java.lang.String toTagString()
public java.lang.String getLabel(int val)
If you want to get all the enumerated labels, the method
getEnumlables() can be used.
val - the integer value which ought to be one of the enumerations.LeafSyntax.getEnumlabels()public int getInt(java.lang.String s)
If you want to get all the enumerated values, the method
getEnumint() can be used.
s - the string value which should be one of the enumerations.LeafSyntax.getEnumint()public boolean checkValue(int i)
In 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.
i - the integer value.public boolean checkValue(java.lang.String s)
NOTE : 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.
s - the string value.boolean IsConstrained()
public boolean isConstrained()
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.
public boolean isEnumerated()
public boolean isRanged()
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.
LeafSyntax.isEnumerated()public LeafSyntax getSyntax()
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.
public java.lang.String[] getRangeItems()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
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)
boolean isImportedTC(java.lang.String tcName)
public java.lang.String getEquivname()
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||