Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Properties

Reference to Low Level API.

brokerConnector: BrokerConnector

Reference to the broker connector.

fabric: FabricApi

Reference to fabric API.

stores: BusStoreApi

Reference to Store API.

zoneRef: any

Reference to ngZone.

id: string = ...
version: string = version

Accessors

  • get logger(): Logger

Methods

  • closeChannel(cname: string, from?: string): boolean
  • Close a channel. If the closer is the last subscriber, then the channel is destroyed.

    Parameters

    • cname: string
    • Optional from: string

    Returns boolean

    true if channel can be closed or not.

  • connectBridge(readyHandler: MessageFunction<string>, endpoint: string, topicLocation: string, queueLocation?: string, numBrokerRelays?: number, host?: string, port?: number, applicationDestinationPrefix?: string, user?: string, pass?: string, useSSL?: boolean, autoReconnect?: boolean, advancedConfig?: BridgeConnectionAdvancedConfig): MessageHandler<StompBusCommand, any>
  • Connect up the bridge to a new broker.

    Parameters

    • readyHandler: MessageFunction<string>
    • endpoint: string
    • topicLocation: string
    • Optional queueLocation: string
    • numBrokerRelays: number = 1
    • Optional host: string
    • Optional port: number
    • Optional applicationDestinationPrefix: string
    • Optional user: string
    • Optional pass: string
    • Optional useSSL: boolean
    • autoReconnect: boolean = true
    • Optional advancedConfig: BridgeConnectionAdvancedConfig

    Returns MessageHandler<StompBusCommand, any>

    connected commands will auto trigger the readyHandler().

  • Create a new transaction that can be composed of bus requests, cache initializations or both. Asynchronous transactions will all fire at once and return once all requests return. Syrnchonrous transactions will fire in sequence and only proceed to the next transaction event once the preceeding response has returned.

    Parameters

    Returns BusTransaction

  • destroy(): void
  • easterEgg(): void
  • enableDevMode(): void
  • enableMessageProxy(config: MessageProxyConfig): IFrameProxyControl
  • getName(): string
  • isGalacticChannel(cname: string): boolean
  • listenOnce<R>(channel: string, name?: string, id?: string): MessageHandler<R, any>
  • Listen for a single response on a channel, process then automatically stop handling any more.

    Type parameters

    • R

    Parameters

    • channel: string
    • name: string = ...
    • Optional id: string

    Returns MessageHandler<R, any>

    {MessageHandler reference to MessageHandler, the handle() function will process a single response.

  • listenRequestOnce<R>(channel: string, name?: string, id?: string): MessageHandler<R, any>
  • Listen to a channel for a single command, handle the command then stop online for any other new requests.

    Type parameters

    • R

    Parameters

    • channel: string
    • name: string = ...
    • Optional id: string

    Returns MessageHandler<R, any>

    reference to MessageHandler, then handle() function will only fire once.

  • listenRequestStream<R>(channel: string, name?: string, id?: string): MessageHandler<R, any>
  • Listen to a channel for all requests, continue handling requests until the handler is closed.

    Type parameters

    • R

    Parameters

    • channel: string
    • name: string = ...
    • Optional id: string

    Returns MessageHandler<R, any>

    reference to MessageHandler, then handle() function will continue to fire until closed.

  • listenStream<R>(channel: string, name?: string, id?: string): MessageHandler<R, any>
  • Listen for all responses on a channel. Continue to handle until the stream is closed via the handler.

    Type parameters

    • R

    Parameters

    • channel: string
    • name: string = ...
    • Optional id: string

    Returns MessageHandler<R, any>

    reference to MessageHandler. the handle() function will process all responses until closed.

  • markChannelAsGalactic(channelName: string, brokerIdentity?: string, isPrivate?: boolean): void
  • Marks a channel as galactic. All messages sent to the channel with the "channelName" name will be transmitted to the remote destinations.

    Parameters

    • channelName: string
    • Optional brokerIdentity: string
    • Optional isPrivate: boolean

    Returns void

  • markChannelAsLocal(channelName: string, brokerIdentity?: string): void
  • Marks a channel as local. All messages sent to a local channel will be sent to local destinations and will NOT be sent to remote destinations.

    Parameters

    • channelName: string
    • Optional brokerIdentity: string

    Returns void

  • markChannelsAsGalactic(channelNames: Iterable<string>): void
  • markChannelsAsLocal(channelNames: Iterable<string>): void
  • requestOnce<T, R>(sendChannel: string, requestPayload: T, returnChannel?: string, name?: string): MessageHandler<R, any>
  • Send a command payload to sendChannel and listen for a single response on returnChannel (defaults to sendChannel if left blank). The handle() method on the MessageHandler instance is used to process incoming responses. The handler will stop processing any further responses after the first one.

    Type parameters

    • T

    • R

    Parameters

    • sendChannel: string
    • requestPayload: T
    • Optional returnChannel: string
    • name: string = ...

    Returns MessageHandler<R, any>

    reference to MessageHandler, handle() function receives any inbound response.

  • requestOnceWithId<T, R>(uuid: string, sendChannel: string, requestPayload: T, returnChannel?: string, from?: string): MessageHandler<R, any>
  • Send a command payload to sendChannel with a message ID. Listens for a single response on returnChannel, but only for a response with the same matching ID. Ideal for multi-message sessions where multiple consumers are requesting at the same time on the same. (defaults to sendChannel if left blank). The handle() method on the MessageHandler instance is used to process incoming responses. The handler will stop processing any further responses after the first one.

    Type parameters

    • T

    • R

    Parameters

    • uuid: string
    • sendChannel: string
    • requestPayload: T
    • Optional returnChannel: string
    • Optional from: string

    Returns MessageHandler<R, any>

    reference to MessageHandler handle() function received any inbound responses.

  • requestStream<T, R>(sendChannel: string, requestPayload: T, returnChannel?: string, name?: string): MessageHandler<R, any>
  • Send a command payload to sendChannel and listen for responses on returnChannel (defaults to sendChannel if left blank). Any additional responses will continue to be handled by the MessageHandler instance returned. The handle() method on the MessageHandler instance is used to process incoming responses. The handler will continue to trigger with each new response, until it is closed.

    Type parameters

    • T

    • R

    Parameters

    • sendChannel: string
    • requestPayload: T
    • Optional returnChannel: string
    • name: string = ...

    Returns MessageHandler<R, any>

    reference to MessageHandler, handle() function receives any inbound responses.

  • requestStreamWithId<T, R>(uuid: string, sendChannel: string, requestPayload: T, returnChannel?: string, name?: string): MessageHandler<R, any>
  • Send a command payload to sendChannel with and ID and listen for responses (also with that ID) on returnChannel (defaults to sendChannel if left blank). Any additional responses will continue to be handled by the MessageHandler instance returned. The handle() method on the MessageHandler instance is used to process incoming responses. The handler will continue to trigger with each new response, until it is closed.

    Type parameters

    • T

    • R

    Parameters

    • uuid: string
    • sendChannel: string
    • requestPayload: T
    • Optional returnChannel: string
    • name: string = ...

    Returns MessageHandler<R, any>

    reference to the MessageHandler, handle() function receives any inbound responses.

  • respondOnce<R>(sendChannel: string, returnChannel?: string, name?: string): MessageResponder<R, any>
  • Listen for a command on sendChannel and return a single response via the generate() method on MessageResponder. The returned value will be sent as a response message on the return channel (defaults to sendChannel if left blank). Once a single response has been sent, no more command messages will be processed.

    Type parameters

    • R

    Parameters

    • sendChannel: string
    • Optional returnChannel: string
    • name: string = ...

    Returns MessageResponder<R, any>

    reference to MessageResponder, generate() function returns response payload.

  • respondStream<R>(sendChannel: string, returnChannel?: string, name?: string): MessageResponder<R, any>
  • Listen for requests on sendChannel and return responses via the generate() method on MessageResponder. The returned value will be sent as a response message on the return channel (defaults to sendChannel if left blank). The responder will continue to stream responses to each command until the unubscribe() method is called.

    Type parameters

    • R

    Parameters

    • sendChannel: string
    • Optional returnChannel: string
    • name: string = ...

    Returns MessageResponder<R, any>

    reference to MessageResponder, generate() function returns response payload.

  • sendErrorMessage(cname: string, payload: any, name?: string, proxyBroadcast?: boolean): void
  • sendErrorMessageWithId<E>(cname: string, payload: E, id: string, from?: string, proxyBroadcast?: boolean): void
  • sendErrorMessageWithIdAndVersion<E>(cname: string, payload: E, id: string, version: number, from?: string, proxyBroadcast?: boolean): void
  • sendGalacticMessage(cname: string, payload: any, from?: string): void
  • Fire a galactic send notification to the montitor like it was a regular send on Observable. The bridge will then pick this up and fire a SEND frame down the wire to that destination.

    Parameters

    • cname: string
    • payload: any
    • Optional from: string

    Returns void

  • sendRequestMessage(cname: string, payload: any, name?: string): void
  • sendRequestMessageWithId<R>(cname: string, payload: R, id: string, from?: string, proxyBroadcast?: boolean): void
  • Send a command payload to a channel with a supplied ID in the command

    Type parameters

    • R

    Parameters

    • cname: string
    • payload: R
    • id: string
    • Optional from: string
    • proxyBroadcast: boolean = false

    Returns void

  • sendRequestMessageWithIdAndVersion<R>(cname: string, payload: R, id: string, version: number, from?: string, proxyBroadcast?: boolean): void
  • sendResponseMessage(cname: string, payload: any, name?: string): boolean
  • sendResponseMessageWithId<R>(cname: string, payload: R, id: string, from?: string, proxyBroadcast?: boolean): void
  • Send a response payload to a channel with a supplied ID in the response.

    Type parameters

    • R

    Parameters

    • cname: string
    • payload: R
    • id: string
    • Optional from: string
    • proxyBroadcast: boolean = false

    Returns void

  • sendResponseMessageWithIdAndVersion<R>(cname: string, payload: R, id: string, version: number, from?: string, proxyBroadcast?: boolean): void
  • setNgZoneRef(ngZoneRef: any): void
  • bootWithOptions(logLevel: LogLevel, disableBootMessage: boolean, darkTheme?: boolean): EventBus
  • Boot and create a singleton EventBus instance with custom options for logging level and boot message

    Parameters

    • logLevel: LogLevel

      log level to set

    • disableBootMessage: boolean

      set to true to turn off the boot message.

    • darkTheme: boolean = false

      enable dark theme logging (defaults to false)

    Returns EventBus

    the bus

  • destroy(): void
  • Reboot the bus, critical for tests, reboot destroys the singleton and re-creates it.

    Returns EventBus

    the newly rebooted event bus.

  • rebootWithOptions(logLevel: LogLevel, disableBootMessage: boolean): EventBus
  • Reboot the bus, critical for tests, reboot destroys the singleton and re-creates it.

    Parameters

    • logLevel: LogLevel

      log level to set

    • disableBootMessage: boolean

      set true to turn off the boot message.

    Returns EventBus

    the newly rebooted bus

  • rebuildId(): string
  • If you need to reset the ID of this bus, call this, but it may have undesirable effects. This should only be called when re-booting the bus.

    Returns string

Generated using TypeDoc