|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Interface Summary | |
|---|---|
| MibContext | A MIB symbol context. |
| Class Summary | |
|---|---|
| FileLocation | A file location. |
| Mib | An SNMP MIB module. |
| MibbleBrowser | A program for browsing MIB files in a GUI. |
| MibblePrinter | A program that parses and prints a MIB file. |
| MibbleValidator | A program that parses and validates a MIB file. |
| MibImport | A MIB import list. |
| MibLoader | A MIB loader. |
| MibLoaderLog | A MIB loader log. |
| MibMacroSymbol | A MIB macro symbol. |
| MibSymbol | A MIB symbol. |
| MibType | The base MIB type class. |
| MibTypeSymbol | A MIB type symbol. |
| MibTypeTag | A MIB type tag. |
| MibValue | The base MIB value class. |
| MibValueSymbol | A MIB value symbol. |
| MibWriter | A MIB output stream writer. |
| Exception Summary | |
|---|---|
| MibException | A MIB exception. |
| MibLoaderException | A MIB loader exception. |
Provides the SNMP MIB file loading and validation classes. A
MIB file is loaded with the
MibLoader class. The
contents of the MIB file are hereafter accessed with the
Mib class. Below follows a
simple example of loading a MIB file:
MibLoader loader = new MibLoader();
Mib mib;
try {
mib = loader.load(<inputfile>);
} catch (FileNotFoundException e) {
System.err.println(e.getMessage());
} catch (MibLoaderException e) {
e.getLog().printTo(System.err);
}
A Mib consists of a set of
MibSymbols. There are
two types of symbols, one representing a MIB value assignment
(MibValueSymbol)
and one representing a MIB type assignment
(MibTypeSymbol).
In most normal usage (i.e. with SNMP), only the value symbols are
of interest. Below follows a simple example printing all the
value symbols in a loaded MIB file:
Iterator iter = mib.getAllSymbols().iterator();
MibSymbol symbol;
while (iter.hasNext()) {
symbol = (MibSymbol) iter.next();
if (symbol instanceof MibValueSymbol) {
System.out.println(symbol.toString());
}
}
A MIB value symbol contains a name, a
MibType, and a
MibValue. The type
symbols only contain a name and a type. There are several
different types and value implementations, present in the
net.percederberg.mibble.snmp,
net.percederberg.mibble.type, and
net.percederberg.mibble.value packages.
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||