Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ActionObserver<I, O>

An ActionObserver can passively listen to {@link Actor#run} inputs and outputs for all actors on a certain bus.

ActionObserver should not edit inputs and outputs, they should be considered immutable.

see

Actor

see

Bus

Type parameters

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Protected constructor

Properties

Readonly bus

bus: Bus<Actor<I, IActorTest, O>, I, IActorTest, O>

Readonly name

name: string

Methods

Abstract onRun

  • onRun(actor: Actor<I, IActorTest, O>, action: I, output: Promise<O>): void
  • Invoked when an action was run by an actor.

    Parameters

    • actor: Actor<I, IActorTest, O>

      The action on which the {@link Actor#run} method was invoked.

    • action: I

      The original action input.

    • output: Promise<O>

      A promise resolving to the final action output.

    Returns void

Generated using TypeDoc