# Interface CompilationMonitor

public interface CompilationMonitor
The `CompilationMonitor` interface is implemented by classes that are supposed to monitor the progress of a multi MIB file compilation operation of the `SmiManager`.

Version:
  2.1.0
Author:
  Frank Fock

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `compilationProgress(String moduleName, int current, int maxCount, SmiCompiler.Strictness strictness)`
  Notifies about the current compilation progress.
  `boolean`
  `loadingProgress(String fileName, int current, int maxCount)`
  Notifies about the current loading (IO) progress.
  `default boolean`
  `sorted(List<SmiModuleImport> sortedModuleNamesWithDependencies, int failedOffset, Set<String> missingModules)`
  Indicates that the sorting operation for the modules has been completed.
  `boolean`
  `sortingProgress(String fileName, int current, int maxCount)`
  Notifies about the current sorting progress.

- ## Method Details

  - ### loadingProgress

    boolean loadingProgress(String fileName, int current, int maxCount)
    Notifies about the current loading (IO) progress.
    Parameters:
      `fileName` - the name of the currently processed MIB or ZIP file.
      `current` - the index of the current file (zero-based).
      `maxCount` - the maximum count of files to be processed.
    Returns:
      `false` if the compilation (loading) should be aborted.

  - ### sortingProgress

    boolean sortingProgress(String fileName, int current, int maxCount)
    Notifies about the current sorting progress.
    Parameters:
      `fileName` - the name of the currently processed MIB or ZIP file.
      `current` - the index of the current file (zero based).
      `maxCount` - the maximum count of files to be processed.
    Returns:
      `false` if the compilation (sorting) should be aborted.

  - ### sorted

    default boolean sorted(List<SmiModuleImport> sortedModuleNamesWithDependencies, int failedOffset, Set<String> missingModules)
    Indicates that the sorting operation for the modules has been completed.
    Parameters:
      `sortedModuleNamesWithDependencies` - a list containing of `SmiModuleImport` which indentifies the sorted MIB modules by `SmiModuleImport.getModuleName()` and the dependencies of each module by `SmiModuleImport.getImportedModuleNames()`.
      `failedOffset` - the starting index (one-based) of the modules that failed to determine their dependencies. If zero is returned, then all modules have been successfully sorted.
      `missingModules` - a set of module names that are missing to resolve all imports. If there are any missing modules, the compilation will fail for at least one of the modules.
    Returns:
      `false` if the compilation should be aborted.
    Since:
      2.1.0

  - ### compilationProgress

    boolean compilationProgress(String moduleName, int current, int maxCount, SmiCompiler.Strictness strictness)
    Notifies about the current compilation progress.
    Parameters:
      `moduleName` - the name of the last compiled MIB module.
      `current` - the index of the current MIB module (zero-based).
      `maxCount` - the maximum count of MIB modules to be compiled.
      `strictness` - the current strictness of the compiler while compiling this MIB module.
    Returns:
      `false` if the compilation should be aborted.