Union of all possible concrete channel classes that may be returned by the service.
Type used to identify specific Channels. Though simply an alias of string
, use of this type indicates use of the string
as a channel identifier, and that the user should avoid assuming any internal structure and instead treat as a fully opaque object
Event fired whenever a window changes channel. See addEventListener.
This event can be used to track all channel changes, rather than listening only to a specific channel.
The channel that the window now belongs to.
Will be null
if the window has just been closed, and so is being removed from a channel without being added to
another.
The window that has switched channel.
The previous channel that the window belonged to.
Will be null
if the window has just been created, and so doesn't have a previous channel.
Event fired when a window is added to a channel. See ChannelBase.addEventListener.
Note that this event will typically fire as part of a pair - since windows must always belong to a channel, a window can only join a channel by leaving its previous channel. The exceptions to this rule are when the window is created and destroyed when there will be no previous channel or no current channel, respectively.
To listen for channel changes across all (or multiple) channels, there is also a top-level ChannelChangedEvent.
The channel that window now belongs to. Will always be the channel object that ChannelBase.addEventListener was called on.
The window that has just been added to the channel.
The channel that the window belonged to previously.
Will be null
if this event is being fired on a newly-created window.
Event fired when a window is removed from a channel. See ChannelBase.addEventListener.
Note that this event will typically fire as part of a pair - since windows must always belong to a channel, a window can only join a channel by leaving it's previous channel. The exceptions to this rule are when the window is created and destroyed when there will be no previous channel or no current channel, respectively.
To listen for channel changes across all (or multiple) channels, there is also a top-level ChannelChangedEvent.
The channel that the window now belongs to.
Will be null
if the window is leaving the channel due to it being closed.
The window that has just been removed from the channel.
The channel that the window belonged to previously. Will always be the channel object that ChannelBase.addEventListener was called on.
The channel in which all windows will initially be placed.
All windows will belong to exactly one channel at all times. If they have not explicitly been placed into a channel via a ChannelBase.join call, they will be in this channel.
If an app wishes to leave any other channel, it can do so by (re-)joining this channel.
Fetches a channel object for a given channel identifier. The channelId
property maps to the ChannelBase.id field.
The ID of the channel to return
Returns the channel that the current window is assigned to.
The window to query. If omitted, will use the window that calls this method.
Returns an app channel with the given name. Either creates a new channel or returns an existing channel.
It is up to your organization to decide how to share knowledge of these custom channels. As with organization
defined contexts, app channel names should have a prefix specific to your organization to avoid name collisions,
e.g. 'company-name.channel-name'
.
The service will assign a unique ID when creating a new app channel, but no particular mapping of name to ID should be assumed.
The name of the channel. Must not be an empty string.
Gets all service-defined system channels.
This is the list of channels that should be used to populate a channel selector. All channels returned will have additional metadata that can be used to populate a selector UI with a consistent cross-app channel list.
Context channels allow end-user filtering of context broadcasts. Each window is assigned to a particular context channel, and any broadcasts by any window in that channel will only be recevied by the other windows in that channel. The assignment of windows to channels would typically be managed by the user, through either a channel selector widget built into the window itself, or through a separate channel manager application.
All windows will initially be placed in the default channel, and will remain there unless they explicitly join another channel.
There are three types of channels: DefaultChannel, SystemChannel and AppChannel.