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

Actor types:

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

See

  • IActionDereference
  • IActorDereferenceOutput

Hierarchy (view full)

Constructors

Properties

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

The bus this actor subscribes to.

name: string

The name for this actor.

Default

{<rdf:subject>}

Methods

  • Deinitialize this actor. This should be used for cleaning up things when the application is shut down, such as closing files and removing temporary files.

    Returns Promise<any>

    A promise that resolves when the actor has been deinitialized.

  • 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.

    • Optional headers: 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.

  • Initialize this actor. This should be used for doing things that take a while, such as opening files.

    Returns Promise<any>

    A promise that resolves when the actor has been initialized.

Generated using TypeDoc