Comunica Link Traversal
    Preparing search index...

    Class MediatorCombineArray<A, I, T, O, TS>

    A comunica mediator that concatenates an array of all actor results.

    The actors that are registered first will appear earlier in the array.

    Type Parameters

    • A extends Actor<I, T, O, TS>
    • I extends IAction
    • T extends IActorTest
    • O extends IActorOutput
    • TS = undefined

    Hierarchy

    • Mediator<A, I, T, O, TS>
      • MediatorCombineArray

    Implements

    Index

    Constructors

    Properties

    bus: Bus<A, I, T, O, TS>

    The bus this mediator will mediate over.

    combiner: (results: O[]) => O
    fields: string[]

    The field names of the test result fields over which must be mediated.

    filterErrors: boolean | undefined

    If actors that throw test errors should be ignored

    name: string

    The name for this mediator.

    {<rdf:subject>}
    

    Methods

    • Protected

      Construct a human-friendly failure message that accumulates the given actors's failure messages.

      Parameters

      • action: I

        The action that was executed.

      • actorFailures: string[]

        The failure messages that were collected from actor tests based on the given executed action.

      Returns string

    • Mediate for the given action.

      This will send the test action on all actors in the bus. The action will be run on the actor that tests best, of which the result will be returned.

      Parameters

      • action: I

        The action to mediate for.

      Returns Promise<O>

      A promise that resolves to the mediation result.

    • Mediate for the given action to get an actor.

      This will send the test action on all actors in the bus. The actor that tests best will be returned.

      Parameters

      • action: I

        The action to mediate for.

      Returns Promise<TestResult<A, TS>>

      A promise that resolves to the best actor.

    • Mediate for the given action.

      This will send the test action on all actors in the bus. The action will be run on the actor that tests best, of which the result will be returned.

      Parameters

      • action: I

        The action to mediate for.

      Returns Promise<TestResult<O, TS>>

      A promise that resolves to the mediation result.

    • Mediate for the given action with the given actor test results for the action.

      One actor must be returned that provided the best test result. How 'best' is interpreted, depends on the implementation of the Mediator.

      Returns Promise<TestResult<any, TS>>

      A promise that resolves to the best actor.

    • Publish the given action in the bus.

      This will send the test action on all actors in the bus. All actor replies will be returned.

      Parameters

      • action: I

        The action to mediate for.

      Returns IActorReply<A, I, T, O, TS>[]

      The list of actor replies.

    • Parameters

      • obj: any
      • path: string[]

      Returns any