|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.adventnet.snmp.mibs.MibOperations
The MibOperations Class provides MIB support for the SNMP libraries. It enables the user to support SNMP operations by using the information in the MIB Modules.
The MibOperations class needs to be instantiated to parse and use MIBs. Instantiate this class to add dynamic MIB support to your SNMP applications. Use the methods of this class to load MIBs and perform MIB related operations
For instance, to use in an application
MibOperations mibOps = new MibOperations(); try { mibOps.loadMibModules("RFC1213-MIB"); }catch (Exception ex) { System.err.println("Error loading MIBs: " + ex); }
Some methods like getMibNode() are present both in MibModule and in the MibOperations class. If MibOperations.getMibNode() is used, it will search for the node in all the mibs loaded so far whereas if you use MibModule.getMibNode() the search is restricted to that particular Module.
To get a MibModule instance you have to do MibOperations.getMibModule(String name). This will return the MibModule. The argument for getMibModule is the module name specified in the imports.The argument should be case sensitive,that is to say, the case of the argument should match with the case of the module name . To get the enumeration of all the modules loaded, use MibOperations.getMibModules().
In case the module is getting loaded from a http url location, there might be issues related to content-type handling. Specifically, unless the web-server is configured to handle MIB extensions cds and cmi, you can receive errors in loading the MIB. While plain MIB files are in ascii, configuration issues on web-server do not come into the picture. But , the compiled MIB being binary type is affected if the content-type is indicated by the server as text/plain or text/html etc.
Field Summary | |
static int |
ALL_MESSAGES
For printing all the debug messages |
static byte |
CRITICAL
For setting the critical parsing level |
static int |
CRITICAL_MESSAGES
For printing all the critical messages |
static byte |
LENIENT
For setting flexible parsing level |
static byte |
MYSQL
For setting the MySql database |
static byte |
NORMAL
For setting normal parsing level. |
static byte |
ORACLE
For setting the Oracle database |
static byte |
SERIOUS
For setting the serious parsing level |
static int |
SERIOUS_MESSAGES
For printing all the serious messages |
static int |
WARNING_MESSAGES
For printing all the warning messages |
Constructor Summary | |
MibOperations()
This instantiate a new MibOperations instance for MIB operations. |
Method Summary | |
void |
addChecks(byte[] checks,
byte parsingLevel)
Used to add checks to the existing parsing level. |
void |
addLabel(java.lang.String addLabel)
Used to add label which should not be treated as a reserved word by the MIB parser. |
void |
createCompiledMibs(java.lang.String mibs)
Used to create compiled mibs namely the cmi and cds files. |
SnmpVarBind |
createVariableBinding(java.lang.String varName,
java.lang.String[] indexes,
java.lang.String value)
Creates an SnmpVarBind instance with the supplied parameters. |
void |
enableDisplayHint(boolean flag)
Used to set the displayHint flag. |
java.lang.String |
encodeInstanceString(java.util.Vector indexValue,
java.util.Vector indexMibNodes)
Encodes an instance string based on the Snmp Type of the indexMibNode. |
byte[] |
getChecks(byte parsingLevel)
Used to get the checks available for a particular parsingLevel. |
byte |
getDatabaseName()
Gets the name of the Database. |
java.util.Vector |
getErrorMessages(java.lang.String module)
Returns Vector of MibErrorMessages object for the module specified. |
java.util.Vector |
getErrorModuleNames()
Returns the names of modules which are having parsing errors. |
java.lang.String |
getErrorString(SnmpPDU pdu)
Gives a detailed error information on the PDU using information from the loaded MIBs. |
boolean |
getIgnoreSpecificControlCodes()
Used to get the value determining whether the new-line characters, tabs and carriage returns are printed or their hex values |
byte |
getImportsParsingLevel()
Returns the parsingLevel for the dependency MIB files. |
java.lang.String |
getInstanceString(SnmpOID oid)
Gets the Instance portion of OID as a String. |
java.lang.String |
getInstanceString(SnmpOID oid,
MibNode node)
Gets the Instance portion of OID as a String. |
LeafSyntax |
getLeafSyntax(SnmpOID oid)
Gets the syntax for the node corresponding to this oid. |
MibModule |
getMibModule(MibNode node)
Gets the MIB Module that contains the specified MibNode. |
MibModule |
getMibModule(java.lang.String name)
Gets the MIB Module from list of already loaded MIBs. |
java.util.Enumeration |
getMibModuleNames()
Gets the names of the Mib modules loaded. |
java.util.Enumeration |
getMibModules()
Gets all the MIB modules loaded in this MibOperations instance. |
MibNode |
getMibNode(SnmpOID oid)
Gets the MibNode for this SnmpOID instance by searching all the MIB modules. |
MibNode |
getMibNode(java.lang.String oidString)
Gets the node corresponding to this label. |
MibNode |
getMibNode(java.lang.String nodeLabel,
java.lang.String mib)
Gets the node correspoding to the label in this mib. |
MibNode |
getMibNode(java.util.Vector oid)
Gives the MibNode per the Vector of Strings OID argument. |
java.lang.String |
getMibPath()
Gets the search Path in which the Mib Parser will search for the MIB modules. |
MibTrap |
getMibTrap(SnmpOID enterprise,
int genericType,
int specificType)
Gets the trap definition matching the given enterprise, generic type and specific type values. |
java.lang.String |
getModuleNameDefinition(java.lang.String file)
Lets you know the module name contained in this MIB file. |
java.lang.String[] |
getModuleNameDefinitions(java.lang.String fileName)
Gives all the module names contained in this mib file. |
int |
getModuleSize()
Returns the number of modules loaded in this MibOperations instance. |
java.lang.String |
getMultipleRevision()
Gets the multiple revisions availabe for the MIB. |
MibNode |
getNearestNode(SnmpOID oid)
Gets the node corresponding to the oid which is nearest to this SnmpOID instance. |
java.util.Vector |
getNodesFromNames(java.util.Vector nodes)
Gets the MibNodes corresponding to the names in the Vector. |
java.util.Vector |
getNodesFromString(java.lang.String nodeList)
Gets the MibNodes corresponding to the node names in the nodelist. |
boolean |
getOverwriteCMI()
Deprecated. since 4.0, replaced by isOverwriteCMI() |
byte |
getParsingLevel()
Returns the parsingLevel. |
java.lang.String |
getSerializedMibFileName()
Retrieves the Serialized MIB file name. |
SnmpOID |
getSnmpOID(java.lang.String s)
Creates an SnmpOID instance based on the loaded MIBs. |
LeafSyntax |
getSyntaxByName(java.lang.String name)
Gets the syntax for the node represented by the String argument. |
boolean |
getThrowFileNotFound()
Deprecated. |
void |
initJdbcParams(java.lang.String driverName,
java.lang.String URL,
java.lang.String userName,
java.lang.String passWord)
If you need to use database support, you have to invoke this method to initialize the Jdbc Parameters. |
boolean |
isDBConnected()
Used to know whether the Database connection is alive or not. |
boolean |
isDisplayHintEnabled()
Used to know whether the displayHint flag is enabled or not. |
boolean |
isLoadFromCompiledMibs()
Used to know whether the MIB is loaded from the compiled mibs. |
boolean |
isLoadFromDatabase()
Used to know whether the MIB is loaded from the DataBase. |
boolean |
isLoadFromSerializedMibs()
Used to know whether the MIB is loaded from serialized mibs. |
boolean |
isMultipleRevision()
Used to know whether the multiple revision is set or not. |
boolean |
isOverwriteCMI()
Used to know whether the compiled mib files are overwritten. |
boolean |
isOverwriteDatabase()
Gets the overwriteDataBase boolean. |
boolean |
isOverwriteSerializedMibs()
Used to know whether the serialized mib files are overwritten. |
boolean |
isReadDesc()
Used to know whether reading the descriptions from compiled modules is enabled. |
boolean |
isSerializeMibs()
Gets the serializeMibs boolean |
boolean |
isShowImportedIndex()
Used to know whether the external indices are shown in the Mib tree. |
MibModule |
loadMibModule(java.applet.Applet applet,
java.net.URL url)
Load a MIB Module from an applet using the URL. |
MibModule |
loadMibModule(java.lang.String fileName)
Load a MIB Module from this file. |
void |
loadMibModules(java.applet.Applet applet,
java.lang.String mibs)
Load a set of MIB Modules from an applet using the string URLs. |
void |
loadMibModules(java.lang.String mibs)
Load a set of MIB Modules from files. |
void |
registerParsingLevel(byte parsingLevel,
byte[] checks)
Used to create an used defined parsing level. |
void |
removeChecks(byte[] checks,
byte parsingLevel)
Used to remove checks from the existing parsing level. |
void |
setDatabaseName(byte type)
Used to set the database. |
void |
setDebug(boolean debug)
Defines whether debugging output should be generated to stdout. |
static void |
setDebugMessageLevel(int level)
Sets the debug message level. |
void |
setIgnoreSpecificControlCodes(boolean specConCode)
Used to set the value determining whether the new-line characters, tabs and carriage returns are printed as they are or their hex values. |
void |
setImportsParsingLevel(byte parsingLevel)
Used to set the level of parsing for the dependency MIB files. |
void |
setLoadFromCompiledMibs(boolean flag)
Defines whether to load mib from compiled MIBs. |
void |
setLoadFromDatabase(boolean flag)
Defines whether to load the MIB from DataBase. |
void |
setLoadFromSerializedMibs(boolean flag)
Defines whether to load mib from serialized MIB file. |
void |
setMibFileExtension(java.lang.String extension)
Registers the extensions with which the MIB file is to be searched. |
void |
setMibPath(java.lang.String path)
Sets the search Path in which the Mib Parser will search for the MIB modules. |
void |
setMultipleRevision(java.lang.String revisionFileName)
Sets the Multiple revision for the MIB. |
void |
setOverwriteCMI(boolean overWrite)
Defines whether to overwrite the existing compiled files. |
void |
setOverwriteDatabase(boolean overWrite)
Defines whether to overwrite the existing database files. |
void |
setOverwriteSerializedMibs(boolean flag)
Defines whether to overwrite the existing serialized MIB files. |
void |
setParsingLevel(byte parsingLevel)
Used to set the level of parsing. |
void |
setReadDesc(boolean readFlag)
Sets the flag for reading the descriptions from compiled mib modules. |
void |
setSerializedMibFileName(java.lang.String fileName)
Defines the name with which the serialized MIB file is to be stored. |
void |
setSerializeMibs(boolean flag)
Defines whether to serialize the MibModule. |
void |
setShowImportedIndex(boolean flag)
Sets the showImportedIndex boolean value. |
void |
setThrowFileNotFound(boolean value)
Deprecated. |
java.lang.String |
toByteString(SnmpPDU pdu)
Returns the byte representation of the SnmpPDU using the MIB information. |
java.lang.String |
toByteString(SnmpVarBind varBind)
Returns the byte representation of SnmpVarbind using the MIB information. |
java.lang.String |
toByteString(SnmpVar var,
SnmpOID oid)
Gives a translated value for the SnmpVar instance using the MIB information. |
java.lang.String |
toShortString(SnmpOID oid)
Provides the short translated name representation for the SnmpOID instance. |
java.lang.String |
toString(SnmpOID oid)
Provides the translated name representation for the SnmpOID instance if found in loaded Mibs. |
java.lang.String |
toString(SnmpPDU pdu)
Returns the string value of the pdu using the MIB information |
java.lang.String |
toString(SnmpVarBind varbind)
Provides a translated value for an SNMP variable binding using information from the loaded MIBs. |
java.lang.String |
toString(SnmpVar var,
SnmpOID oid)
Provides a translated value for an SNMP variable using information from the loaded MIBs. |
java.lang.String |
toTagString(SnmpVarBind varbind)
Provides a translated value for an SNMP variable binding using information from the loaded MIBs. |
void |
unloadAllMibModules()
Unload all the loaded MibModules. |
boolean |
unloadMibModule(MibModule module)
Unloads the MibModule from the modules table. |
MibModule |
unloadMibModule(java.lang.String name)
Unloads the MibModule from the MibModules loaded in this instance. |
java.lang.String |
varBindsToString(SnmpPDU pdu)
Gets variable bindings in the PDU, using the information from loaded MIBs. |
Field Detail |
public static final int ALL_MESSAGES
public static final int WARNING_MESSAGES
public static final int SERIOUS_MESSAGES
public static final int CRITICAL_MESSAGES
public static final byte MYSQL
public static final byte ORACLE
public static final byte LENIENT
public static final byte NORMAL
public static final byte SERIOUS
public static final byte CRITICAL
Constructor Detail |
public MibOperations()
Method Detail |
public void setMibFileExtension(java.lang.String extension)
The file will be searched with the name of the module with this extension.
So the MIB filename should be same as the modulename with this extension.
for example, MibOperations mibOps = new MibOperations(); mibOps.setMibFileExtension("mi2,abc"); mibOps.loadMibModule("RFC1213-MIB"); The file will be searched in the following sequence Without the extension With the extension which we set. With the default extensions In this case, it searches for the file in the following order RFC1213-MIB, RFC1213-MIB.mi2, RFC1213-MIB.abc, RFC1213-MIB.mib, RFC1213-MIB.txt, RFC1213-MIB.my
In case of applications, it also searches for the MIB module in all the files, present in that directory.
extension
- Extension of the MIB file.public void setThrowFileNotFound(boolean value)
value
- the boolean valuepublic boolean getThrowFileNotFound()
public void setDebug(boolean debug)
debug
- the boolean value.
The debugging output is generated to stdout if the boolean is set to true.public void setSerializeMibs(boolean flag)
flag
- the boolean valuesetSerializedMibFileName(java.lang.String)
,
setLoadFromSerializedMibs(boolean)
public boolean isSerializeMibs()
setSerializeMibs(boolean)
public void setLoadFromSerializedMibs(boolean flag)
flag
- the boolean value.setSerializeMibs(boolean)
public boolean isLoadFromSerializedMibs()
setLoadFromSerializedMibs(boolean)
public void setSerializedMibFileName(java.lang.String fileName)
For example, if the fileName is ifMib.txt, then the serialized file will be created with the file name of ifMib.ser
fileName
- the name of the file in which the serialized file is to be stored.setLoadFromSerializedMibs(boolean)
,
loadMibModule(String)
,
loadMibModules(Applet,String)
,
loadMibModule(Applet,URL)
public java.lang.String getSerializedMibFileName()
setSerializedMibFileName(java.lang.String)
public void setOverwriteSerializedMibs(boolean flag)
After loading the MIB file as a serialized MIB file, if you do any changes in the MIB file and load it again it will not get reflected in the loaded MIB file. So at that time, this method has to be called, to overwrite the serialized MIB files and get the latest changes.
Setting this boolean to true is recommended only if you have changed the contents of the MIB file. Otherwise, this will unnecessarily increase the loading time of the MIB's. NOTE: This applies only when the setLoadFromSerializedMibs is set to true.
overWrite
- the boolean valuepublic boolean isOverwriteSerializedMibs()
setOverwriteSerializedMibs(boolean)
public void setLoadFromCompiledMibs(boolean flag)
For example, RFC1213-MIB is loaded, it will automatically load RFC1213-MIB.cmi if it exists. Otherwise it creates compiled files by parsing the MIB and then loads from it. This is in case of application. In case of applets, due to the restriction imposed for writing the files, it cannot create compiled files.
So in case of applets, the MIBs can be loaded from compiled files only if they are already present. We can create the compiled MIB files by using the method createCompiledMibs(String). This is slightly slower than loading from precompiled mibs.
If both loadFromSerializedMibs and loadFromCompiledMibs is set to true, it will just try to load the MIB as a serialized file.
flag
- the boolean valuecreateCompiledMibs(java.lang.String)
public boolean isLoadFromCompiledMibs()
setLoadFromCompiledMibs(boolean)
public void setOverwriteCMI(boolean overWrite)
After loading the MIB file as a compiled MIB file, if you do any changes in the MIB file and load it again it will not get reflected in the loaded MIB file. So at that time, this method has to be called, to overwrite the compiled MIB files and get the latest changes.
Setting this boolean to true is recommended only if you have changed the contents of the MIB file. Otherwise, this will unnecessarily increase the loading time of the MIB's. NOTE: This applies only when the setLoadFromCompiledMibs is set to true.
overWrite
- the boolean valuepublic boolean getOverwriteCMI()
isOverwriteCMI()
setOverwriteCMI(boolean)
public boolean isOverwriteCMI()
setOverwriteCMI(boolean)
public void setMibPath(java.lang.String path)
The MIB file is searched in the current working directory, or from the directory where the MIB file is loaded. If the search path is set, the MIB file will be searched in addition to this directories.
searchPath
- String specifying the search path, for multiple
paths separate the paths by the pipe (|) symbol.public java.lang.String getMibPath()
setMibPath(java.lang.String)
public void loadMibModules(java.lang.String mibs) throws MibException, java.io.IOException, java.io.FileNotFoundException
mibs
- list of file names seperated by a space,tab, new line, carriage return and pipe symbol.MibException
- is thrown upon parse errors.java.io.IOException
- is thrown upon IO errors.java.io.FileNotFoundException
- is thrown if the file is not found.setLoadFromSerializedMibs(boolean)
,
setLoadFromCompiledMibs(boolean)
,
setLoadFromDatabase(boolean)
,
setMibFileExtension(java.lang.String)
,
loadMibModules(Applet, String)
,
setMibPath(java.lang.String)
,
setParsingLevel(byte)
,
setImportsParsingLevel(byte)
public void loadMibModules(java.applet.Applet applet, java.lang.String mibs) throws MibException, java.io.IOException, java.io.FileNotFoundException
applet
- applet from which the mib is loaded.mibs
- space seperated list of mib files.MibException
- is thrown upon parse errors.java.io.IOException
- is thrown upon IO errors.java.io.FileNotFoundException
- is thrown if the file is not found.public MibModule loadMibModule(java.applet.Applet applet, java.net.URL url) throws MibException, java.io.IOException, java.io.FileNotFoundException
applet
- applet from which the mib is loaded.url
- the name of the URLMibException
- is thrown upon parse errors.java.io.IOException
- is thrown upon IO errors.java.io.FileNotFoundException
- is thrown if the file is not found.public MibModule loadMibModule(java.lang.String fileName) throws MibException, java.io.IOException, java.io.FileNotFoundException
fileName
- the name of the mib file to be loaded.MibException
- is thrown upon parse errors.java.io.IOException
- is thrown upon IO errors.java.io.FileNotFoundException
- is thrown if the file is not found.public void createCompiledMibs(java.lang.String mibs) throws MibException, java.io.IOException, java.io.FileNotFoundException
mibs
- the space seperated list of mib files for which the compiled mib files is to be generated.MibException
- is thrown upon parse errors.java.io.IOException
- is thrown upon IO errors.java.io.FileNotFoundException
- is thrown if the file is not found.public MibModule getMibModule(java.lang.String name)
name
- the MibModule name identified in the DEFINITIONS
clause of the MIB. The name is not identified by the filename
of the MIB.getMibModules()
public java.lang.String getModuleNameDefinition(java.lang.String file) throws MibException, java.io.IOException, java.io.FileNotFoundException
In most cases API users would not require this method as they would only need to load MIBs. This method is used to get the module name of the MIB module present in the MIB file without loading the MIB file. This method will return the first module name present in this MIB file. If the multiple MIB module, present in this MIB file, the getMibModuleDefintions method will be used to retrieve all the MIB modules present in this MIB file.
file
- name of the file containing the MIB module.MibException
- is thrown upon parse errors.java.io.IOException
- is thrown upon IO errors.java.io.FileNotFoundException
- is thrown if the file is not found.getModuleNameDefinitions(java.lang.String)
public MibModule getMibModule(MibNode node)
node
- the node which is present in the required module.public java.util.Enumeration getMibModules()
getMibModule(java.lang.String)
public static void setDebugMessageLevel(int level)
level
- the various debug levels as mentioned below
public SnmpVarBind createVariableBinding(java.lang.String varName, java.lang.String[] indexes, java.lang.String value) throws java.lang.IllegalArgumentException, SnmpException
varName
- The name, or numeric object ID, of MIB variable
for which this request is being createdindexes
- The ordered list of index values (of type
String or SnmpVar values. Parameter can be null for non-tabular columnsvalue
- The SnmpVar value to use for sets. The value is null for gets.indexMibNodes
- The index nodes for this node's parentSnmpException
- is thrown upon variable creation errors.java.lang.IllegalArgumentException
- is thrown if arguments are invalid.public SnmpOID getSnmpOID(java.lang.String s)
s
- String OID of the form .N.N.N..., or N.N.N..., in which case
the static Standard_Prefix in the SnmpAPI class is used.
N can be a number or a name.public LeafSyntax getLeafSyntax(SnmpOID oid)
oid
- SnmpOID object.public MibNode getMibNode(java.util.Vector oid)
oid
- Vector of String OIDspublic java.lang.String varBindsToString(SnmpPDU pdu)
pdu
- the SnmpPDU instancepublic java.lang.String getErrorString(SnmpPDU pdu)
pdu
- the SnmpPDU instancepublic java.lang.String toByteString(SnmpPDU pdu)
pdu
- the SnmpPDU instancetoString(SnmpPDU)
public java.lang.String toByteString(SnmpVarBind varBind)
varBind
- the SnmpVarBind instancetoString(SnmpVarBind)
public java.lang.String toByteString(SnmpVar var, SnmpOID oid)
toString(SnmpVar,SnmpOID)
public java.lang.String toString(SnmpPDU pdu)
pdu
- the SnmpPDU instancepublic java.lang.String toString(SnmpVarBind varbind)
varbind
- the SnmpVarBind instancepublic java.lang.String toTagString(SnmpVarBind varbind)
varbind
- the SnmpVarBind instancepublic java.lang.String toString(SnmpVar var, SnmpOID oid)
var
- the SnmpVar object for the oid.oid
- the oid whose value needs to be printed.public java.lang.String toString(SnmpOID oid)
oid
- the SnmpOID instance valuepublic java.lang.String toShortString(SnmpOID oid)
oid
- the SnmpOID instancepublic java.lang.String getInstanceString(SnmpOID oid)
oid
- the SnmpOID for which the instance component is required.LeafSyntax.decodeInstanceString(java.lang.String, java.util.Vector)
,
LeafSyntax.encodeInstanceString(java.util.Vector, java.util.Vector)
public java.lang.String getInstanceString(SnmpOID oid, MibNode node)
oid
- the SnmpOID instancenode
- the MibNode object corresponding to the oid.Please note that this verification is not comprehensive for sake of efficiency. So it is not ensured that a null will be returned for a mismatched node. This returns the sub-string corresponding to the instance. For cases such as MibNode being system and OID as sysDescr the return value will start with the sub-id of mib-2. The intersection of the node oid and the given oid are eliminated from the returned oid string.
public MibNode getMibNode(SnmpOID oid)
oid
- the SnmpOID instancepublic MibNode getNearestNode(SnmpOID oid)
oid
- the SnmpOID instancepublic MibTrap getMibTrap(SnmpOID enterprise, int genericType, int specificType)
enterprise
- the enterprise value of the trap-typegenericType
- the integer valuespecificType
- the integer valuepublic MibNode getMibNode(java.lang.String oidString)
oidString
- the name of the nodeMibModule.getMibNode(String)
public MibNode getMibNode(java.lang.String nodeLabel, java.lang.String mib)
nodeLabel
- the name of the MibNodemib
- the MIB name in which the node is being searched.public java.util.Vector getNodesFromNames(java.util.Vector nodes)
nodes
- Vector of the node names.public java.util.Vector getNodesFromString(java.lang.String nodeList)
nodeList
- list of the node names separated by space or comma.public LeafSyntax getSyntaxByName(java.lang.String name)
name
- the name of the syntax or TCpublic int getModuleSize()
public boolean unloadMibModule(MibModule module)
module
- the nstance of the MibModule to be unloaded.public MibModule unloadMibModule(java.lang.String name)
name
- the name of the module to be unloaded.public void unloadAllMibModules()
public void addLabel(java.lang.String addLabel)
addLabel
- the word which should not be treated as a reserved word.public boolean getIgnoreSpecificControlCodes()
setIgnoreSpecificControlCodes(boolean)
public void setIgnoreSpecificControlCodes(boolean specConCode)
specConCode
- the boolean value public void setReadDesc(boolean readFlag)
readFlag
- the boolean valuepublic boolean isReadDesc()
public java.util.Enumeration getMibModuleNames()
public java.lang.String encodeInstanceString(java.util.Vector indexValue, java.util.Vector indexMibNodes) throws java.lang.NumberFormatException
indexValue
- Vector of String values.indexMibNodes
- Vector of indexMibNodes corresponding to the indexValuepublic void initJdbcParams(java.lang.String driverName, java.lang.String URL, java.lang.String userName, java.lang.String passWord) throws MibException
driverName
- Name of the DataBase driver.URL
- URL pointing to the DataBase file nameuserName
- userNamepassWord
- passwordMibException
- if any SQLException is thrown.public void setLoadFromDatabase(boolean flag)
flag
- the boolean value.initJdbcParams(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
,
setDatabaseName(byte)
public boolean isLoadFromDatabase()
setLoadFromDatabase(boolean flag)
public void setOverwriteDatabase(boolean overWrite)
overWrite
- the boolean valuepublic boolean isOverwriteDatabase()
setOverwriteDatabase(boolean overWrite)
public void setDatabaseName(byte type)
type
- the byte value (e.g. MibOperations.ORACLE )public byte getDatabaseName()
setDatabaseName(byte type)
public void setMultipleRevision(java.lang.String revisionFileName)
revisionFileName
- the name of the files containing different Revisions of the MibModule.
The file names can be seperated by space or pipe(|) symbol.public java.lang.String getMultipleRevision()
public boolean isMultipleRevision()
public void setShowImportedIndex(boolean flag)
flag
- the boolean value. public boolean isShowImportedIndex()
public java.lang.String[] getModuleNameDefinitions(java.lang.String fileName) throws java.io.FileNotFoundException, MibException, java.io.IOException
fileName
- name of the file containing the MIB module.getModuleNameDefinition(java.lang.String)
public void setParsingLevel(byte parsingLevel)
level
- the various parsing levels as mentioned below
public void setImportsParsingLevel(byte parsingLevel)
parsingLevel
- the various parsing levels as mentioned below
public void registerParsingLevel(byte parsingLevel, byte[] checks)
parsingLevel
- the byte value other than 0,1,2,3checks
- the checks to be included in this new parsing levelpublic void addChecks(byte[] checks, byte parsingLevel)
checks
- the byte array of checks to be added.parsingLevel
- the parsinglevel in which the checks are added.public void removeChecks(byte[] checks, byte parsingLevel)
checks
- the byte array of checks to be removed.parsingLevel
- the parsinglevel from which the checks are removed.public byte getParsingLevel()
setParsingLevel(byte)
public byte getImportsParsingLevel()
setParsingLevel(byte)
public byte[] getChecks(byte parsingLevel)
parsingLevel
- the parsingLevelpublic java.util.Vector getErrorModuleNames()
getErrorMessages(java.lang.String)
public java.util.Vector getErrorMessages(java.lang.String module)
getErrorModuleNames()
public void enableDisplayHint(boolean flag)
flag
- the boolean valuepublic boolean isDisplayHintEnabled()
public boolean isDBConnected()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |