Comunica
    Preparing search index...

    Class ActorDereferenceBase<I, T, O, TS>Abstract

    A base actor for dereferencing URLs to (generic) streams.

    Actor types:

    • Input: IActionDereference: A URL.
    • Test:
    • Output: IActorDereferenceOutput: A Readable stream
    • IActionDereference
    • IActorDereferenceOutput

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    beforeActors: Actor<I, T, O, TS>[] = []

    Actor that must be registered in the bus before this actor.

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

    The bus this actor subscribes to.

    name: string

    The name for this actor.

    {<rdf:subject>}
    

    Methods

    • Handle the given error as a rejection or delegate it to the logger, depending on whether or not hard errors are enabled.

      Type Parameters

      • N
      • M extends Readable

      Parameters

      • action: I

        An action.

      • error: unknown

        An error that has occurred.

      • output: N

        Data to add to the output

      Returns Promise<N & { data: M }>

    • Run the given action on this actor.

      In most cases, this method should not be called directly. Instead, #runObservable should be called.

      Parameters

      • action: I

        The action to run.

      • sideData: TS

      Returns Promise<O>

      A promise that resolves to the run result.

    • Run the given action on this actor AND invokes the Bus#onRun method.

      Parameters

      • action: I

        The action to run.

      • sideData: TS

      Returns Promise<O>

      A promise that resolves to the run result.

    • Check if this actor can run the given action, without actually running it.

      Parameters

      • action: I

        The action to test.

      Returns Promise<TestResult<T, TS>>

      A promise that resolves to the test result.