Home

# Class goog.messaging.MultiChannel

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.

extends goog.Disposable

Instance Method Summary
| `createVirtualChannel(string name) ⇒ !goog.messaging.MultiChannel.VirtualChannel` Creates a new virtual channel that will communicate across the underlying channel.

`disposeInternal()`

Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code dispose} method must be used. For example:

    mypackage.MyClass = function() {
    goog.base(this);
    // Constructor logic specific to MyClass.
    ...
    };
    goog.inherits(mypackage.MyClass, goog.Disposable);

    mypackage.MyClass.prototype.disposeInternal = function() {
    goog.base(this, 'disposeInternal');
    // Dispose logic specific to MyClass.
    ...
    };

| `handleDefault_(string serviceName, (Object|string) payload)` Handles the default service for the underlying channel. This dispatches any unrecognized services to the appropriate virtual channel.