Options
All
  • Public
  • Public/Protected
  • All
Menu

The builder injects a Gateway in Custom Elements.

Type parameters

  • E: HTMLElement

    the type of the Custom Element

Hierarchy

  • AbstractGatewayBuilder<E>
    • GatewayInversionBuilder

Index

Constructors

Protected constructor

Properties

Protected _gatewayProvider

_gatewayProvider: GatewayProvider

_propName

_propName: string
internal

Protected _subscriptionsByType

_subscriptionsByType: Map<string, [ElementSubscriptionListener<HTMLElement, Event<any, MessageHeaders>>, undefined | SubscribeOptions][]>

Static Private DEFAULT_CONTAINER

DEFAULT_CONTAINER: Container

Methods

Protected build

  • build(Constructor: CustomElementConstructor<E>, hooks: HooksRegistration<E & { __ceb_gateway_subscriptions: Set<Removable> }>): void
  • This API is dedicated for developer of Builders.

    Parameters

    • Constructor: CustomElementConstructor<E>
    • hooks: HooksRegistration<E & { __ceb_gateway_subscriptions: Set<Removable> }>

    Returns void

decorate

  • decorate(): PropertyDecorator
  • Decorates the property of the gateway.

    Returns PropertyDecorator

key

provider

subscribe

  • subscribe<M>(EventType: string, listener: ElementSubscriptionListener<E, M>, options?: SubscribeOptions): AbstractGatewayBuilder<E>
  • subscribe<M>(): GatewaySubscriptionBuilder<E, M>
  • Subscribe to a Message Event.

    Type parameters

    • M: Event<any, MessageHeaders, M>

    Parameters

    • EventType: string

      the type of the event

    • listener: ElementSubscriptionListener<E, M>

      the listener

    • Optional options: SubscribeOptions

      the options

    Returns AbstractGatewayBuilder<E>

  • When used as a decorator, returns a fresh Subscription builder to decorate a method.

    Type parameters

    • M: Event<any, MessageHeaders, M>

    Returns GatewaySubscriptionBuilder<E, M>

Static get

Static setDefaultContainer

  • setDefaultContainer(container: Container): void

Generated using TypeDoc