goog.Disposable | |
goog.messaging.PortCaller | goog.Disposable |
operatorPort
: !goog.messaging.MessageChannel
The channel for
communicating with the operator. The other side of this channel should be
passed to
goog.messaging.PortOperator#addPort . Must be either a
goog.messaging.PortChannel or a decorator wrapping a PortChannel;
in particular, it must be able to send and receive MessagePort s. |
![]()
Registers a connection to another context in the network. This is called when
the operator sends us one end of a
MessageChannel , either because
this caller requested a connection with another context, or because that
context requested a connection with this caller.
It's possible that the remote context and this one request each other roughly
concurrently. The operator doesn't keep track of which contexts have been
connected, so it will create two separate MessageChannel s in this
case. However, the first channel created will reach both contexts first, so
we simply ignore all connections with a given context after the first.
|
code » | |
![]()
No description.
|
code » | |
![]()
No description.
|
code » |
![]()
Invokes a callback function when this object is disposed. Callbacks are
invoked in the order in which they were added.
Arguments:
|
code » | |||
![]()
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 » | |||
![]()
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 » | |||
Use
#isDisposed instead.
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
![]()
Associates a disposable object with this object so that they will be disposed
together.
Arguments:
|
code » |
![]()
The collection of channels for communicating with other contexts in the
network. Each value can contain a
goog.aync.Deferred and/or a
goog.messaging.MessageChannel .
If the value contains a Deferred, then the channel is a
goog.messaging.DeferredChannel wrapping that Deferred. The Deferred
will be resolved with a goog.messaging.PortChannel once we receive
the appropriate port from the operator. This is the situation when this
caller requests a connection to another context; the DeferredChannel is
used to queue up messages until we receive the port from the operator.
If the value does not contain a Deferred, then the channel is simply a
goog.messaging.PortChannel communicating with the given context.
This is the situation when this context received a port for the other
context before it was requested.
If a value exists for a given key, it must contain a channel, but it
doesn't necessarily contain a Deferred.
|
Code » | |
![]()
No description.
|
Code » | |
The channel to the
goog.messaging.PortOperator for this network.
|
Code » |
![]()
No description.
|
Code » |