Configuration

Overview

Channels are based on Shared Contexts - named objects, holding cross-app data in the form of key/value pairs. The io.Connect Channels are defined in a channels.json file located in %LocalAppData%/interop.io/io.Connect Desktop/Desktop/config. It contains an array of objects, each one defining a different Channel. The Channel Selector app, which enables users to manually assign Channels to apps and control the data flow for directional Channels, can be configured globally and per app from the system.json file of io.Connect Desktop and from the app definition respectively.

Defining Channels

The following example demonstrates a minimal definition of two Channels - red and blue:

[
    {
        "name": "Red",
        "meta": {
            "color": "red"
        }
    },
    {
        "name": "Blue",
        "meta": {
            "color": "#66ABFF"
        }
    }
]

Each Channel object must have the following required properties:

Property Type Description
"name" string Required. Unique ID of the Channel.
"meta" object Required. Meta data about the Channel. The minimum you must specify here is the Channel color. You can also define other meta data which will be visible to all apps using the Channel.

The "meta" object has the following required property:

Property Type Description
"color" string Required. The Channel color, displayed on the Channel Selector UI and on each app using that Channel. Can be either an HTML color name or a hexadecimal color code.

You can define any number of Channels in io.Connect Desktop for your apps to use.

The following example demonstrates adding a custom black Channel to the already existing list of Channels in io.Connect Desktop:

{
    "name": "Black",
    "meta": {
        "color": "black"
    }
}

Custom Channel

Channel Selector

You can configure the Channel Selector globally via the system.json system configuration file of io.Connect Desktop located in the %LocalAppData%/interop.io/io.Connect Desktop/Desktop/config folder, and per app via the app definition. The settings in the app definition will override the global system settings.

Available since io.Connect Desktop 9.3

To configure the Channel Selector globally, use the "channelSelector" property of the "windows" top-level key in the system.json file:

{
    "windows": {
        "channelSelector": {
            "enabled": true,
            "type": "directionalSingle"
        }
    }
}

To configure the Channel Selector per app, use the "channelSelector" property of the "details" top-level key in the app definition:

{
    "details": {
        "channelSelector": {
            "enabled": true,
            "type": "single",
            "channelId": "Black"
        }
    }
}

The "channelSelector" object has the following properties:

Property Type Description
"enabled" boolean If true, will allow showing the Channel Selector. Defaults to false.
"channelId" string Name of the Channel to which the window will be joined by default when it's started.
"readOnly" boolean If true, the Channel Selector will be visible, but the user won't be able to switch between Channels from it. Defaults to false.
"type" "single" | "directionalSingle" Type of the Channel Selector to show on the io.Connect Windows. A single Channel Selector allows the window to join a single Channel to which it can subscribe and publish data unrestrictedly. A directional single Channel Selector allows the window to join a single Channel, but also enables the user to restrict the window from publishing or from subscribing to the current Channel. Defaults to "single".

Inheriting Channels

Available since io.Connect Desktop 9.3

To make apps opened from your app inherit its current Channel, use the "childrenInheritChannel" top-level property in the app definition. It accepts a Boolean value or a list of app names specifying the child apps that will inherit the current Channel:

{
    "childrenInheritChannel": true
}

// Or:

{
    "childrenInheritChannel": ["my-app", "my-other-app"]
}

⚠️ Note that if the definition of the child app contains a "channelId" property, it will be joined to the Channel specified in its definition and not to the current Channel of the parent.

Channel Mapping

The default io.Connect Channels are mapped to Channels (or other similar implementations) that other third-party apps may use, like the Bloomberg Groups used by the Bloomberg Adapter, or the default FDC3 Channels.

The following example demonstrates how an io.Connect Channel is mapped to a Bloomberg Group and to an FDC3 Channel by using the "meta" object in its configuration:

{
    "name": "Red",
    "meta": {
        "color": "red",
        // Mapping to a Bloomberg Group.
        "blpGroup": {
            "name": "Group-G",
            "readDataFieldPath": "data.partyPortfolio.ric",
            "writeDataFieldPath": "data.partyPortfolio.ric",
            "read": "ric",
            "write": "ric"
        },
        // Mapping to an FDC3 Channel.
        "fdc3": {
            "id": "fdc3.channel.1",
            "displayMetadata": {
                "name": "Channel 1",
                "glyph": "1"
            }
        }
    }
}