Home

# Class goog.messaging.RespondingChannel

Creates a new RespondingChannel wrapping a single MessageChannel.

extends goog.Disposable

Instance Method Summary
| `callbackProxy_(function ((Object|string)): ? callback, !Object message)` A intermediary proxy for service callbacks to be invoked and return their their results to the remote caller's callback.
| `callbackServiceHandler_(?Object message)` Receives the results of the peer's service results.

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

| `getNextSignature_() ⇒ number` Gets a random number to use for method invocation results.
| `registerService(string serviceName, function (Object): ? callback)` Registers a service to be called when a message is received.
| `send(string serviceName, (Object|string) payload, function ((Object|null)): ? callback)` Sends a message over the channel.