AboutSupportDeveloper GuideVersion 36.122.80.23

Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.

Hierarchy

  • Base
    • InteropModule

Accessors

Methods

Accessors

  • get me(): Identity
  • Provides access to the OpenFin representation of the current code context (usually a document such as a View or Window), as well as to the current Interop context.

    Useful for debugging in the devtools console, where this will intelligently type itself based on the context in which the devtools panel was opened.

    Returns Identity

Methods

  • Connects a client to an Interop broker. This is called under-the-hood for Views in a Platform.

    Parameters

    • name: string

      The name of the Interop Broker to connect to. For Platforms, this will default to the uuid of the Platform.

    • Optional interopConfig: InteropConfig

      Information relevant to the Interop Broker. Typically a declaration of what context(s) the entity wants to subscribe to, and the current Context Group of the entity.

    Returns InteropClient

    Remarks

    Example

    const interopConfig = {
    currentContextGroup: 'green'
    }

    const interopBroker = await fin.Interop.init('openfin');
    const client = await fin.Interop.connectSync('openfin', interopConfig);
    const contextGroupInfo = await client.getInfoForContextGroup();
    console.log(contextGroupInfo);
  • Initializes an Interop Broker. This is called under-the-hood for Platforms.

    Parameters

    Returns Promise<InteropBroker>

    Remarks

    For Platforms, this is set up automatically. We advise to only create your own Interop Broker when not using a Platform app. You can override functions in the Interop Broker. More info here.

    Example

    const interopBroker = await fin.Interop.init('openfin');
    const contextGroups = await interopBroker.getContextGroups();
    console.log(contextGroups);