constructor(messageChannel) {
    super();

    /**
     * The message channel wrapped in a MultiChannel so we can send private and
     * public messages on it.
     * @type {goog.messaging.MultiChannel}
     * @private
     */
    this.messageChannel_ = new goog.messaging.MultiChannel(messageChannel);

    /**
     * Map of invocation signatures to function callbacks. These are used to
     * keep track of the asyncronous service invocations so the result of a
     * service call can be passed back to a callback in the calling frame.
     * @type {
     *     Object<number, {callback: function(Object), errback:
     * function(Object)}>
     * }
     * @private
     */
    this.sigCallbackMap_ = {};

    /**
     * The virtual channel to send private messages on.
     * @type {goog.messaging.MultiChannel.VirtualChannel}
     * @private
     */
    this.privateChannel_ = this.messageChannel_.createVirtualChannel(
        e2e.messaging.AsyncRespondingChannel.PRIVATE_CHANNEL_);

    /**
     * The virtual channel to send public messages on.
     * @type {goog.messaging.MultiChannel.VirtualChannel}
     * @private
     */
    this.publicChannel_ = this.messageChannel_.createVirtualChannel(
        e2e.messaging.AsyncRespondingChannel.PUBLIC_CHANNEL_);

    this.privateChannel_.registerService(
        e2e.messaging.AsyncRespondingChannel.CALLBACK_SERVICE_,
        goog.bind(this.callbackServiceHandler_, this), true);
  }
@param {goog.messaging.MessageChannel} messageChannel The messageChannel to
    to wrap and allow for responses. This channel must not have any
existing services registered. All service registration must be done through
the
    {@link goog.messaging.RespondingChannel#registerService} API instead.
    The other end of the channel must also be a RespondingChannel.