Interface FileExtractionListener


public interface FileExtractionListener
Provides executable functions ensuring tight binding the user applications to the extraction lifecycle.

Note: All the functions on this interface are dispatched by the FileExtractor.extract().

Warning: this listener interface is an essential component of developing custom system loaders; as it requires freeing the native stream resources manually through the onExtractionFinalization(FileExtractor, FileLocator). If not freeing the resources with this interface was attained, then a try-with resources could be used.

  • Method Details

    • onExtractionCompleted

      void onExtractionCompleted(FileExtractor fileExtractor)
      Dispatched when the extraction process is completed.
      Parameters:
      fileExtractor - the extractor in-command.
    • onExtractionFailure

      void onExtractionFailure(FileExtractor fileExtractor, Throwable throwable)
      Dispatched when the extraction process has failed with a throwable component.
      Parameters:
      fileExtractor - the extractor in-command.
      throwable - the throwable captured from the FileExtractor API.
    • onExtractionFinalization

      void onExtractionFinalization(FileExtractor fileExtractor, FileLocator fileLocator)
      Dispatched when the extraction process is finalized, at this point, manually freeing active resources should be attained.
      Parameters:
      fileExtractor - the extractor in-command.
      fileLocator - the file locator used by the extractor to locate files inside compressions.