Options
All
  • Public
  • Public/Protected
  • All
Menu

Class default<Channel, SegmentValue, Component, Job, Result>

SociablyEngine provide helpers to render element tree into tasks to execute, it pass tasks through dispatch middlewares, execute tasks and return the results poped through middlewares.

Type parameters

Hierarchy

  • default

Index

Constructors

Properties

platform: string
queue: default<Job, Result>
renderer: default<SegmentValue, Component>
worker: SociablyWorker<Job, Result>

Methods

  • dispatchJobs(channel: null | Channel, jobs: Job[]): Promise<DispatchResponse<Job, Result>>
  • dispatch construct the dispatch frame containing the tasks along with other info throught dispatch middleware. At the end of the stack of middlewares, all the tasks is executed and the response poped up along the retruning chain of the middlewares.

    Parameters

    • channel: null | Channel
    • jobs: Job[]

    Returns Promise<DispatchResponse<Job, Result>>

  • render renders sociably element tree into task to be executed. There are three kinds of task: "dispatch" contains the jobs to be executed on the certain platform, "pause" represent the interval made by element which should be waited between "dispatch" tasks, "thunk" holds a function registered by service which will be excuted after all jobs dispatched.

    Type parameters

    Parameters

    Returns Promise<null | DispatchResponse<Job, Result>>

  • start(): void
  • stop(): void

Generated using TypeDoc