Class TerminalDocCapture

java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.TerminalDocCapture

@ApplicationScoped public class TerminalDocCapture extends Object
Captures the most recent PipeDoc that reached the terminal sidecar node, keyed by account. The terminal's input IS the pipeline's final output, so this is the processed doc after the last step ran.

Used by the single-doc crawl flow to surface the resulting document in the UI ("see the output"). Bounded to one doc per account — fine for the 1000-doc runs too (just the last one), cheap for the single-doc case it's built for.

  • Constructor Summary

    Constructors
    Constructor
    Description
    CDI.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    capture(String accountId, ai.pipestream.data.v1.PipeDoc doc)
    Record the terminal doc for accountId (overwrites the previous).
    void
    clear(String accountId)
    Drop the captured doc for accountId (called on run cleanup).
    ai.pipestream.data.v1.PipeDoc
    last(String accountId)
    The last terminal doc for accountId, or null if none.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TerminalDocCapture

      public TerminalDocCapture()
      CDI.
  • Method Details

    • capture

      public void capture(String accountId, ai.pipestream.data.v1.PipeDoc doc)
      Record the terminal doc for accountId (overwrites the previous). No-op if accountId is null/blank or doc is null.
      Parameters:
      accountId - the account to key the captured doc under
      doc - the terminal PipeDoc to store for that account
    • last

      public ai.pipestream.data.v1.PipeDoc last(String accountId)
      The last terminal doc for accountId, or null if none.
      Parameters:
      accountId - the account whose captured doc to return
      Returns:
      the last captured PipeDoc for that account, or null if none was captured (or accountId is null)
    • clear

      public void clear(String accountId)
      Drop the captured doc for accountId (called on run cleanup). No-op if accountId is null.
      Parameters:
      accountId - the account whose captured doc to remove