The goog.messaging.MultiChannel Class

goog.messaging.MultiChannel
> goog.Disposable

goog.messaging.MultiChannel(underlyingChannel)

Creates a new MultiChannel wrapping a single MessageChannel. The underlying channel shouldn't have any other listeners registered, but it should be connected. Note that the other side of the channel should also be connected to a MultiChannel with the same number of virtual channels.

underlyingChannel {goog.messaging.MessageChannel}
The underlying channel to use as transport for the virtual channels.

The goog.messaging.MultiChannel.VirtualChannel Class

A message channel that proxies its messages over another underlying channel. … more

.addOnDisposeCallback(callback, opt_scope)

Inherited from goog.Disposable .

Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.

callback {!Function}
The callback function.
opt_scope {Object=}
An optional scope to call the callback in.

.createVirtualChannel(name)

Creates a new virtual channel that will communicate across the underlying channel.

name {string}
The name of the virtual channel. Must be unique for this MultiChannel. Cannot contain colons.
returns {!goog.messaging.MultiChannel.VirtualChannel}
The new virtual channel.

.creationStack {string}

Inherited from goog.Disposable .

If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.

.dispose()

Inherited from goog.Disposable .

Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.

returns {void}
Nothing.

.isDisposed()

Inherited from goog.Disposable .

returns {boolean}
Whether the object has been disposed of.

.registerDisposable(disposable)

Inherited from goog.Disposable .

Associates a disposable object with this object so that they will be disposed together.

disposable {goog.disposable.IDisposable}
that will be disposed when this object is disposed.