messaging.MultiChannel.VirtualChannel Extends goog.Disposable
A message channel that proxies its messages over another underlying channel.

Inheritance

Constructor

goog.messaging.MultiChannel.VirtualChannel(parentname)

Parameters

parent : goog.messaging.MultiChannel
The MultiChannel which created this channel, and which contains the underlying MessageChannel that's used as the transport.
name : string
The name of this virtual channel. Unique among the virtual channels in parent.

Instance Methods

Public Protected Private
connect()
This is a no-op, since the underlying channel is expected to already be initialized when it's passed in.
code »
defaultService_()
The default service to run if no other services match.
code »
disposeInternal()
No description.
code »
doCallback_(callbackvar_args)
Wraps a callback with a function that will log a warning and abort if it's called when this channel is disposed.
Arguments:
callback : function()
The callback to wrap.
var_args : ...*
Other arguments, passed to the callback.
code »
isConnected()
This always returns true, since the underlying channel is expected to already be initialized when it's passed in.
code »
registerDefaultService()
No description.
code »
registerService()
No description.
code »
send()
No description.
code »
addOnDisposeCallback(callbackopt_scope)
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
Arguments:
callback : function(this:T):?
The callback function.
opt_scope : T=
An optional scope to call the callback in.
code »
dispose() void
Disposes of the object. If the object hasn't already been disposed of, calls #disposeInternal. Classes that extend goog.Disposable should override #disposeInternal in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
Returns: void  Nothing.
code »
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend goog.Disposable should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' disposeInternal method. Everywhere else the public dispose method must be used. For example:
  mypackage.MyClass = function() {
    mypackage.MyClass.base(this, 'constructor');
    // Constructor logic specific to MyClass.
    ...
  };
  goog.inherits(mypackage.MyClass, goog.Disposable);

  mypackage.MyClass.prototype.disposeInternal = function() {
    // Dispose logic specific to MyClass.
    ...
    // Call superclass's disposeInternal at the end of the subclass's, like
    // in C++, to avoid hard-to-catch issues.
    mypackage.MyClass.base(this, 'disposeInternal');
  };
code »
getDisposed() boolean
Use #isDisposed instead. No description.
Returns: boolean  Whether the object has been disposed of.
code »
isDisposed() boolean
No description.
Returns: boolean  Whether the object has been disposed of.
code »
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed together.
Arguments:
disposable : goog.disposable.IDisposable
that will be disposed when this object is disposed.
code »

Instance Properties

constructor :
No description.
Code »
logger_ : goog.debug.Logger
Logger object for goog.messaging.MultiChannel.VirtualChannel.
Code »
name_ :
The name of this virtual channel.
Code »
The MultiChannel containing the underlying transport channel.
Code »
creationStack :
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
Code »
disposed_ :
Whether the object has been disposed of.
Code »
onDisposeCallbacks_ :
Callbacks to invoke when this object is disposed.
Code »

Static Properties

goog.messaging.MultiChannel.VirtualChannel.superClass_ :
No description.
Code »

Package messaging.MultiChannel

Package Reference