Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ParallelHandler<TIn, TOut>

A composite handler that executes handlers in parallel.

Type parameters

  • TIn = void

  • TOut = void

Hierarchy

Index

Constructors

constructor

Properties

Private Readonly handlers

handlers: AsyncHandler<TIn, TOut>[]

Methods

canHandle

  • canHandle(input: TIn): Promise<void>
  • Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.

    Parameters

    • input: TIn

    Returns Promise<void>

    A promise resolving if the input can be handled, rejecting with an Error if not.

handle

  • handle(input: TIn): Promise<TOut[]>

handleSafe

  • handleSafe(input: TIn): Promise<TOut[]>