Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

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
  • Get instance of syslog

    Returns Logger

    singleton logger bound to bus.

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

      channel name you want to close.

    • Optional from: string

      optional calling actor (for logging)

    Returns boolean

    true if channel can be closed or not.

  • Unsubscribe from a Galactic Channel. Will send an UNSUBSCRIBE message to broker.

    deprecated

    use markChannelAsGalactic() and fabric.generateFabricRequest()

    Parameters

    • cname: string
    • Optional from: string

      optional calling actor (for logging)

    • Optional brokerIdentity: ChannelBrokerMapping

    Returns void

  • 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>

      fires once the bridge is connected correctly.

    • endpoint: string

      of the broker you're connecting to

    • topicLocation: string

      topic prefix (defaults to /topic)

    • Optional queueLocation: string

      queue prefic (defaults to /queue)

    • Optional numBrokerRelays: number

      defaults to 1, handles multi-connect states according to relay count

    • Optional host: string

      the host of the STOMP broker you want to connect to

    • Optional port: number

      the port of the STOMP broker you want to connect to

    • Optional applicationDestinationPrefix: string

      set the prefix for app published (galactic) messages (i.e. /pub) channels are postpended to this (i.e. /pub/mychannel)

    • Optional user: string

      username (if required)

    • Optional pass: string

      passwowrd (if required)

    • Optional useSSL: boolean

      run over WSS?

    • Optional autoReconnect: boolean

      Automaticallty reconnect on loss of socket? Defaults to 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

    • Optional type: TransactionType

      type of transaction you want, synchonrous or asynchronous (default).

    • Optional name: string

      the name of the transaction, helps you track progress in the console (if enabled)

    Returns BusTransaction

  • destroy(): void
  • Perform any cleanups to free up any resources for garbage collection

    Returns void

  • enableDevMode(): void
  • enableMessageProxy(config: MessageProxyConfig): IFrameProxyControl
  • Enable message proxying between frames, or what ever else we can think of.

    Parameters

    • config: MessageProxyConfig

    Returns IFrameProxyControl

  • isGalacticChannel(cname: string): boolean
  • Check if a channel is marked as Galactic (mapped to broker) or not.

    Parameters

    • cname: string

      name of the channel to check

    Returns boolean

    true if mapped.

  • Listen to all inbound messages send on local broker mapped channel. All messages will be responses.

    deprecated

    use markChannelAsGalactic() and fabric.generateFabricRequest()

    Type parameters

    • R

    Parameters

    • cname: string

      name of the broker mapped destination

    • Optional from: string

      optional calling actor (for logging)

    • Optional galacticConfig: ChannelBrokerMapping

      optional galactic configuration containing broker destination and channel publicity

    Returns MessageHandler<R, any>

    reference to MessageHandler. All responses will be handled via the handle() method.

  • listenOnce<R>(channel: string, from?: 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

      channel to listen to for responses.

    • Optional from: string

      optional name of actor implementing (for logging)

    • Optional id: string

      optional ID of message you're looking for, will filter out all other messages

    Returns MessageHandler<R, any>

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

  • listenRequestOnce<R>(channel: string, from?: 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

      the channel to listen to for requests

    • Optional from: string

      optional name of actor implementing (for logging)

    • Optional id: string

      optional ID of message you're looking for, will filter out all other messages

    Returns MessageHandler<R, any>

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

  • listenRequestStream<R>(channel: string, from?: 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

      the channel to listen to for requests

    • Optional from: string

      optional name of actor implementing (for logging)

    • Optional id: string

      optional ID of message you're looking for, will filter out all other messages

    Returns MessageHandler<R, any>

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

  • listenStream<R>(channel: string, from?: 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

      the channel to listen to for responses.

    • Optional from: string

      optional name of the actor implementing (for logging)

    • Optional id: string

      optional ID of message you're looking for, will filter out all other messages

    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

      name of the channel

    • 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

      name of the channel

    • Optional brokerIdentity: string

    Returns void

  • markChannelsAsGalactic(channelNames: Iterable<string>): void
  • Marks channels as galactic.

    Parameters

    • channelNames: Iterable<string>

      a collection of channel names.

    Returns void

  • markChannelsAsLocal(channelNames: Iterable<string>): void
  • Marks channels as local.

    Parameters

    • channelNames: Iterable<string>

      a collection of channel names.

    Returns void

  • requestOnce<T, R>(sendChannel: string, requestPayload: T, returnChannel?: string, from?: 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

      the channel to send the initial command to

    • requestPayload: T

      the payload to be sent as the command

    • Optional returnChannel: string

      the return channel to listen for responses on (defaults to sendChannel)

    • Optional from: string

      optional name of the actor implementing (for logging)

    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

      the UUID of the message.

    • sendChannel: string

      the channel to send the command to

    • requestPayload: T

      the payload you want to send.

    • Optional returnChannel: string

      the return channel to listen for responses on (defaults to send channel)

    • Optional from: string

      options name of the actor implementing (for logging)

    Returns MessageHandler<R, any>

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

  • requestStream<T, R>(sendChannel: string, requestPayload: T, returnChannel?: string, from?: 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

      the channel to send the initial command to

    • requestPayload: T

      the paylaod to be sent as the command

    • Optional returnChannel: string

      the return channel to listen for responses on (defaults to sendChannel)

    • Optional from: string

      optional name of the actor implementing (for logging)

    Returns MessageHandler<R, any>

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

  • requestStreamWithId<T, R>(uuid: string, sendChannel: string, requestPayload: T, returnChannel?: string, from?: 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

      UUID of the message you want to sent, can also be used as a filter for incoming messages.

    • sendChannel: string

      the channel on which you want to send your payload

    • requestPayload: T

      the payload you want to send.

    • Optional returnChannel: string

      the return channel on which you want to listen.

    • Optional from: string

      optional name of the actor implementing (for logging)

    Returns MessageHandler<R, any>

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

  • respondOnce<T>(sendChannel: string, returnChannel?: string, from?: string): MessageResponder<T, 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

    • T

    Parameters

    • sendChannel: string

      the channel to listen for requests

    • Optional returnChannel: string

      the channel to send responses to (defaults to sendChannel if left blank

    • Optional from: string

      optional name of actor implementing method (for logging)

    Returns MessageResponder<T, any>

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

  • respondStream<T>(sendChannel: string, returnChannel?: string, from?: string): MessageResponder<T, 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

    • T

    Parameters

    • sendChannel: string

      the channel to listen for requests

    • Optional returnChannel: string

      the channel to send responses to (defaults to sendChannel if left blank)

    • Optional from: string

      optional name of actor implementing method (for logging)

    Returns MessageResponder<T, any>

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

  • sendErrorMessage<E>(cname: string, payload: E, from?: string, proxyBroadcast?: boolean): void
  • Send error payload to channel.

    Type parameters

    • E

    Parameters

    • cname: string

      the channel to send the payload to

    • payload: E

      the payload to be send

    • Optional from: string

      optional name of sending actor (for logging)

    • Optional proxyBroadcast: boolean

      optional flag, only required when messages originated in another bus.

    Returns void

  • sendErrorMessageWithId<E>(cname: string, payload: E, id: string, from?: string, proxyBroadcast?: boolean): void
  • Send error payload to channel, with an ID.

    Type parameters

    • E

    Parameters

    • cname: string

      the channel to send the payload to

    • payload: E

      the payload to be send

    • id: string
    • Optional from: string

      optional name of sending actor (for logging)

    • Optional proxyBroadcast: boolean

      optional flag, only required when messages originated in another bus.

    Returns void

  • sendErrorMessageWithIdAndVersion<E>(cname: string, payload: E, id: string, version: number, from?: string, proxyBroadcast?: boolean): void
  • Send error payload to channel, with an ID, and a version.

    Type parameters

    • E

    Parameters

    • cname: string

      the channel to send the payload to

    • payload: E

      the payload to be send

    • id: string

      the UUID you want to send with this error.

    • version: number

      version of the error you want to sent.

    • Optional from: string

      optional name of sending actor (for logging)

    • Optional proxyBroadcast: boolean

      optional flag, only required when messages originated in another bus.

    Returns void

  • sendGalacticMessage<P>(cname: string, payload: P, 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.

    deprecated

    use markChannelAsGalactic() and fabric.generateFabricRequest()

    Type parameters

    • P

    Parameters

    • cname: string

      galactic channel name to send to

    • payload: P

      payload of message

    • Optional from: string

      optional calling actor (for logging)

    Returns void

  • sendRequestMessage<R>(cname: string, payload: R, from?: string): void
  • Send command payload to channel.

    Type parameters

    • R

    Parameters

    • cname: string

      channel name to send payload to

    • payload: R

      the payload to be sent

    • Optional from: string

      option name of sending actor (for logging)

    Returns 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

      channel to send the payload to

    • payload: R

      the payload to be sent

    • id: string

      the ID you want to attach to your command

    • Optional from: string

      optional name of the sending actor (for logging)

    • Optional proxyBroadcast: boolean

      optional flag, only required when messages originated in another bus.

    Returns void

  • sendRequestMessageWithIdAndVersion<R>(cname: string, payload: R, id: string, version: number, 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

      channel to send the payload to

    • payload: R

      the payload to be sent

    • id: string

      the ID you want to attach to your command

    • version: number

      version of command you want to sent (defaults to 1)

    • Optional from: string

      optional name of the sending actor (for logging)

    • Optional proxyBroadcast: boolean

      optional flag, only required when messages originated in another bus.

    Returns void

  • sendResponseMessage<R>(cname: string, payload: R, from?: string): void
  • Send response payload to a channel.

    Type parameters

    • R

    Parameters

    • cname: string

      channel name to send payload to

    • payload: R

      the payload to be sent

    • Optional from: string

      optional name of sending actor (for logging)

    Returns void

  • 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

      the channel name to send the response payload to

    • payload: R

      the payload you want to send in response

    • id: string

      the ID you want to attach to your response

    • Optional from: string

      optional name of the sending actor (for logging)

    • Optional proxyBroadcast: boolean

      optional flag, only required when messages originated in another bus.

    Returns void

  • sendResponseMessageWithIdAndVersion<R>(cname: string, payload: R, id: string, version: number, 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

      the channel name to send the response payload to

    • payload: R

      the payload you want to send in response

    • id: string

      the ID you want to attach to your response

    • version: number

      version of command you want to sent (defaults to 1)

    • Optional from: string

      optional name of the sending actor (for logging)

    • Optional proxyBroadcast: boolean

      optional flag, only required when messages originated in another bus.

    Returns void

  • setNgZoneRef(ngZoneRef: any): void
  • Set NgZone reference for efficient macro task scheduling in Angular apps

    Parameters

    • ngZoneRef: any

    Returns void

  • 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