Class InstrumentedComposer<C extends Candidate,​I extends CompositionComponent<C>,​R extends Result>

    • Field Detail

      • CANDIDATE_COMPOSITION

        public static final TaskDescription CANDIDATE_COMPOSITION
    • Constructor Detail

    • Method Detail

      • isFinished

        public boolean isFinished()
        Description copied from interface: Composer
        Whether this composer has reached a state where it does not want to handle new candidates.
        Specified by:
        isFinished in interface Composer<C extends Candidate,​I extends CompositionComponent<C>,​R extends Result>
        Returns:
        true iff no more candidates will be accepted
      • getIntermediateResult

        public I getIntermediateResult()
        Description copied from interface: Composer
        Typically just returns the internally managed composition. Care must be taken, that this method may be called asynchronously.
        Specified by:
        getIntermediateResult in interface Composer<C extends Candidate,​I extends CompositionComponent<C>,​R extends Result>
        Returns:
        the intermediate result
      • candidatesAreExhausted

        public void candidatesAreExhausted()
        Description copied from interface: Composer
        Hook method which is called when this composer will not receive any more candidates in the future as the connected proposer has been exhausted.
        Specified by:
        candidatesAreExhausted in interface Composer<C extends Candidate,​I extends CompositionComponent<C>,​R extends Result>
      • accept

        public void accept​(C c)
        Description copied from interface: Composer
        Hook method which decides how to handle an incoming candidate. The internal logic decides whether the candidate is eventually added to the current composition.
        Specified by:
        accept in interface Composer<C extends Candidate,​I extends CompositionComponent<C>,​R extends Result>
        Specified by:
        accept in interface java.util.function.Consumer<C extends Candidate>
        Parameters:
        c - the candidate that has been offered to this composer