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

Actor types:

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

Hierarchy (View Summary)

Constructors

Properties

beforeActors: Actor<
    IActionDereference,
    IActorTest,
    IActorDereferenceOutput,
    undefined,
>[] = []

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

bus: Bus<
    Actor<
        IActionDereference,
        IActorTest,
        IActorDereferenceOutput,
        undefined,
    >,
    IActionDereference,
    IActorTest,
    IActorDereferenceOutput,
    undefined,
>

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.

    Parameters

    • action: IActionDereference

      A dereference action.

    • error: unknown

      An error that has occurred.

    • Optionalheaders: Headers

      Optional HTTP headers to pass.

    • requestTime: number = 0

      The time it took to request the page in milliseconds.

    Returns Promise<IActorDereferenceOutput>

    A promise that rejects or resolves to an empty output.