Refinitiv Data Library for TypeScript

IpcBusService

Summary

Interface which should be implemented by user to communicate with Refinitiv Workspace Container session

Methods

subscribe(channel: string, callback: IpcBusCallback)

This method is responsible for creating the subscription for the specific channel. It is used for subscription on all communications published onto a given channel

channel: string Channel name you'd like to create subscription. Required.
callback: IpcBusCallback A callback function to be called when there is a publish on subscribed channel
See [IpcBusCallback] for fields description.

Returned value: IpcBusSubscription.


unsubscribe(channel: string, callback: IpcBusCallback)

This method is responsible to cancel all the subscriptions for specified channel

channel: string A name of the channel to unsubscribe from
callback: IpcBusCallback A callback function used for the subscription.
The same function which is used for appropriate subscription

Returned value: nothing.


publish(channel: string, data: any)

This method is responsible for publishing a message to a given a channel

channel: string A name of the channel which messages will be published to
data: any Any data or message to publish into the channel.

Returned value: nothing.


connect()

This method is responsible for establishing a connection for Container sessions
Used for connection initialization. Should be called firstly before any publish/subscribe

Returned value: Promise<void>. Promise will be resolved after connection is established


IpcBusSubscription

Object which is returned when you make a subscription to the bus channel

unsubscribe()

Method to unsubscribe from current subscription.

See [IpcBusService.subscribe] how to get this object.


IpcBusCallback

unsubscribe()

The callback which should be passed for subscription
This callback function to be called when there is a publish on subscribed channel

Parameters:

Property Is Optional Default Value Description
channel No - Usually the same channel you were subscribing to
data Yes - The data or message transmitted with event through the channel

Returned value: nothing.