Home

# Class goog.messaging.PortCaller

The leaf node of a network.

extends goog.Disposable

Instance Method Summary

`connectionGranted_((Object|string) message)`

Registers a connection to another context in the network. This is called when the operator sends us one end of a {@link 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 {@link 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.

`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.
    ...
    };