Interface DocumentFetchRequest


  • public interface DocumentFetchRequest
    This interface is implemented by the scanner. The scanner will queue an implementation of this DocumentFetchRequest interface for each document it wants to ingest. The connector framework will call getDocument() concurrently for multiple DocumentFetchRequest objects and publish the documents.
    • Method Detail

      • setContentStoreAccess

        void setContentStoreAccess​(ContentStoreAccess contentStoreAccess)
        ContentStoreAccess is used by the fetcher to store content in the content store.
        Parameters:
        contentStoreAccess - the content store access set by the framework
      • getDocument

        DocumentAndAcl getDocument()
                            throws AttivioException
        Called by the framework to get the generated document. Multiple DocumentFetchRequest objects will be queued by the scanner and their getDocument methods will be called concurrently by the framework's thread pool.
        Returns:
        the generated document and optionally the generated ACL (null can be returned if the request was canceled)
        Throws:
        AttivioException - if document generation has failed
      • name

        java.lang.String name()
        A name that identifies the document, typically a URL.
        Returns:
        name
      • cancel

        void cancel()
        Cancel fetching if possible. This method should not block.

        This is called by the framework to cancel a pending request that has not completed.

      • published

        void published()
        This is called by the framework to let the fetcher know the document is published. It can be used, for example, to report IngestionHistoryApi that the document was published.