Interface Router

    • Method Detail

      • isDeterministic

        boolean isDeterministic()
        Indicates if this router will always route an identical document to the same downstream step or steps. It is important to understand that this attribute refers to determinism with respect to document content and anything that depends on the order in which documents are fed, is NOT deterministic.
        Returns:
        True if the document's destination is deterministic, false if it may vary.
      • isConstantNumberOfOutputDocs

        boolean isConstantNumberOfOutputDocs()
        Indicates if the number documents entering this router have a constant linear relationship to the number of documents exiting the router. This relationship need only be constant for a particular plan configuration, and may vary when configured differently in different plans. A document may be considered to have exited the router if it records a terminal status (i.e. Status.DROPPED, or if it is included in the NextSteps object returned from route(Document)
        Returns:
        True if one document in produces a constant number of documents out.
      • getNumberOfOutputCopies

        int getNumberOfOutputCopies()
        Indicates how many copies of a document may be omitted by this router. If isConstantNumberOfOutputDocs() returns false this number represents the maximum output. A negative value indicates that there is no constraint on the number of copies that may be omitted.
        Returns:
        the number of output copies expected.
      • getStep

        Step getStep()
        The step into which the router is configured.
        Returns:
        The step that owns this router.
      • route

        NextSteps route​(Document doc)
        Decide where to send this document. The result may represent some or all of the steps down stream. Note that it is illegal for a router not to select at least one destination, and this will cause errors. It is also prohibited for the router to select a destination not listed on the document.
        Parameters:
        doc - The document to route
        Returns:
        An object encapsulating the destinations to which the document (or copies of it) will be sent.
        See Also:
        Step.getEligibleNextSteps(Document)