Interface ProductSource

All Known Implementing Classes:
BinaryProductSource, DirectoryProductSource, JsonProductSource, ObjectProductSource, SearchResponseXmlProductSource, XmlProductSource, ZipProductSource

public interface ProductSource
A Source of Product events. ProductSources are used to read Products from other formats like XML. ProductSources send a stream of events to ProductOutputs and provide stream like processing for Products. ProductSources should strive to call ProductOutput methods in the following order:
  1. onBeginProduct()
  2. onProperty(), by property name alphabetically
  3. onLink(), by relation alphabetically, by URI alphabetically
  4. onContent(), by content path alphabetically.
  5. onSignature()
  6. onEndProduct()
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Free any resources associated with this source.
    void
    Send a product to the ProductOutput.
  • Method Details

    • streamTo

      void streamTo(ProductHandler out) throws Exception
      Send a product to the ProductOutput.
      Parameters:
      out - the output that will receive the product.
      Throws:
      Exception - if error occurs
    • close

      void close()
      Free any resources associated with this source.