Class BroadcastChannelBroker

a broker which hooks into the Broadcast Channel broker either via shim or substitute lib

Hierarchy

  • BaseBroker
    • BroadcastChannelBroker

Constructors

  • Parameters

    • brokerFactory: Function = broadCastChannelBrokerGenerator

      a factory generating a broker

    • channelGroup: string = DEFAULT_CHANNEL_GROUP

      a group to combine a set of channels

    • crypto: Crypto = noEncryption

      a crypto class

    Returns BroadcastChannelBroker

Properties

crypto: Crypto = noEncryption
EVENT_TYPE: "brokerEvent" = "brokerEvent"

Methods

  • answers a bidirectional message received usage, the client can use this method, to answer an incoming message in a precise manner so that the caller sending the bidirectional message knows how to deal with it this mechanism can be used for global storages where we have one answering entity per channel delivering the requested data, the request can be done asynchronously via promises waiting for answers

    Parameters

    • channel: string

      the channel the originating message

    • request: string | Message

      the requesting message

    • answer: Message

      the answer to the request

    Returns BaseBroker

  • returns an observable on the baseBroker

    Parameters

    • channel: string

    Returns Observable<Message>

  • binding into rxjs produces a subject which can be used via next calls to send messages on the other hand we

    Parameters

    • channel: string

    Returns Subject<Message>

  • Parameters

    • channel: string
    • message: string | Message
    • includeOrigin: boolean = true

    Returns BaseBroker

  • Returns BaseBroker

  • Parameters

    • channel: string
    • listener: ((msg: Message) => void)

    Returns BaseBroker

  • idea... a bidirectional broadcast sends a message and waits for the first answer coming in from one of the receivers sending the message back with a messageIdentifier_broadCastId answer

    Parameters

    • channel: string
    • message: string | Message

    Returns Promise<Message>

  • Returns BaseBroker

  • unregisters a listener from this channel

    Parameters

    • channel: string

      the channel to unregister from

    • listener: ((msg: Message) => void)

      the listener to unregister the channel from

    Returns BaseBroker

Generated using TypeDoc