AboutSupportDeveloper GuideVersion 47.154.100.2
OpenFin JavaScript API
    Preparing search index...

    Interface Channel

    Object representing a context channel.

    interface Channel {
        displayMetadata?: OpenFin.FDC3.v1_2.DisplayMetadata;
        id: string;
        type: string;
        addContextListener(
            handler: OpenFin.FDC3.v1_2.ContextHandler,
        ): OpenFin.FDC3.v1_2.Listener;
        addContextListener(
            contextType: string | null,
            handler: OpenFin.FDC3.v1_2.ContextHandler,
        ): OpenFin.FDC3.v1_2.Listener;
        broadcast(context: OpenFin.FDC3.v1_2.Context): void;
        getCurrentContext(
            contextType?: string,
        ): Promise<OpenFin.FDC3.v1_2.Context | null>;
    }
    Index
    displayMetadata?: OpenFin.FDC3.v1_2.DisplayMetadata

    Channels may be visualized and selectable by users. DisplayMetadata may be used to provide hints on how to see them. For app channels, displayMetadata would typically not be present

    id: string

    Constant that uniquely identifies this channel.

    type: string

    Uniquely defines each channel type.

    • Broadcasts the given context on this channel. This is equivalent to joining the channel and then calling the top-level FDC3 broadcast function.

      Note that this function can be used without first joining the channel, allowing applications to broadcast on channels that they aren't a member of.

      Channel implementations should ensure that context messages broadcast by an application on a channel should not be delivered back to that same application if they are joined to the channel.

      Error with a string from the ChannelError enumeration.

      Parameters

      Returns void

    • Returns the last context that was broadcast on this channel. All channels initially have no context, until a context is broadcast on the channel. If there is not yet any context on the channel, this method will return null.

      The context of a channel will be captured regardless of how the context is broadcasted on this channel - whether using the top-level FDC3 broadcast function, or using the channel-level broadcast function on this object.

      Optionally a contextType can be provided, in which case the current context of the matching type will be returned (if any). Desktop agent implementations may decide to record contexts by type, in which case it will be possible to get the most recent context of the type specified, but this is not guaranteed.

      Error with a string from the ChannelError enumeration.

      Parameters

      • OptionalcontextType: string

      Returns Promise<OpenFin.FDC3.v1_2.Context | null>