com.asprise.imaging.scan

## Interface ScanListener

- All Known Implementing Classes:
    AbstractScanListener

      public interface ScanListener

  Listener for multi-page (e.g, ADF) scan.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `finished(String error)` Scanning session has finished
    `List<Capability>` | `getCapabilitiesToBeSet(int pageIndex, long pageId)` List of capabilities to be set for the given page - in most cases, you should only set capabilities for the first page.
    `Object` | `getPageOutputTarget(int pageIndex, long pageId)` Where to store scan data for the given page either File or OutputStream
    `void` | `pageFinished(int pageIndex, long pageId, String error)` Indicates a page scan is done.
    `void` | `pageProgress(int pageIndex, long pageId, int percent)` Reports the progress of page scanning.
    `void` | `pageStarted(int pageIndex, long pageId)` Indicates a page scan in this session has been started.
    `void` | `started()` Scanning session has started; an ADF session could result multiple pages scanned.

- - ### Method Detail

    - #### getCapabilitiesToBeSet

          List<Capability> getCapabilitiesToBeSet(int pageIndex,
                                                long pageId)

      List of capabilities to be set for the given page - in most cases, you should only set capabilities for the first page.
      Parameters:
        `pageIndex` -
        `pageId` -
      Returns:

    - #### getPageOutputTarget

          Object getPageOutputTarget(int pageIndex,
                                   long pageId)

      Where to store scan data for the given page either File or OutputStream
      Parameters:
        `pageIndex` -
        `pageId` -
      Returns:
        target scan destination or `null` to cancel the scan.

    - #### started

          void started()

      Scanning session has started; an ADF session could result multiple pages scanned.

    - #### pageStarted

          void pageStarted(int pageIndex,
                         long pageId)

      Indicates a page scan in this session has been started.

    - #### pageProgress

          void pageProgress(int pageIndex,
                          long pageId,
                          int percent)

      Reports the progress of page scanning.
      Parameters:
        `percent` - a number between 0 to 100.

    - #### pageFinished

          void pageFinished(int pageIndex,
                          long pageId,
                          String error)

      Indicates a page scan is done.
      Parameters:
        `error` - error message or `null` if succeeded.

    - #### finished

          void finished(String error)

      Scanning session has finished
      Parameters:
        `error` - error message or `null` if succeeded.

Copyright © Asprise Software. All Rights Reserved. Please visit the product page at asprise.com