public interface SmiCompiler
| Modifier and Type | Interface and Description |
|---|---|
static class |
SmiCompiler.OverwriteMode
The OverwriteMode defines whether existing MIB modules should be overwritten or not.
|
static class |
SmiCompiler.Strictness
The Strictness defines the number of syntax checks done on the sources.
|
static class |
SmiCompiler.TargetMode
The TargetMode defines the target for the compiled MIB modules.
|
| Modifier and Type | Method and Description |
|---|---|
List<CompilationResult> |
compile(NamedInputStream[] files,
CompilationMonitor compilationMonitor,
SmiCompiler.TargetMode compilerTargetMode,
SmiCompiler.OverwriteMode overwriteMode,
SmiCompiler.Strictness strictness)
Compiles an array of text or ZIP files provided as
NamedInputStreams. |
List<CompilationResult> compile(NamedInputStream[] files, CompilationMonitor compilationMonitor, SmiCompiler.TargetMode compilerTargetMode, SmiCompiler.OverwriteMode overwriteMode, SmiCompiler.Strictness strictness) throws IOException
NamedInputStreams. The compilation is executed in
three phases:
NamedInputStreams are loaded into memory.CompilationMonitor interface.files - an array of NamedInputStream instances where each instance may represent a text or ZIP file.compilationMonitor - an optional CompilationMonitor implementation to monitor the progress of the compilation.compilerTargetMode - with the mode SmiCompiler.TargetMode.storeIntoRepositoryAndLoad the compiled MIB modules will not only be stored
into the internal MIB repository, but also directly loaded into the MIB cache so that they can be used right
after this method call completes. With SmiCompiler.TargetMode.dryRun no modifications to the MIB repository or MIB
cache are done and only the result of the syntax check is returned.overwriteMode - specifies whether compiled MIB modules will replace existing MIB modules in the MIB repository as well as
in the cache with the same module names or not.strictness - if SmiCompiler.Strictness.lenient is used then syntax and semantic checks are
limited to the necessary minimum. A MIB module that can be successfully parsed in lenient mode may contain
severe standard violations and even errors
that can affect proper formatting and value parsing support for SNMP4J. Use this option only if you can
handle the risk or if you are not able to fix or let fix the errors in the MIB specification(s).CompilationResult instances. Each instance represents an input file. For ZIP files,
a CompilationResult instance is returned for each ZIP file entry.IOException - if any IO operation fails when accessing the input files (InputStreams).Copyright © 2015 SNMP4J.com. All Rights Reserved.