Google is committed to advancing racial equity for Black communities. See how.

bind method

void bind (InterfaceHandle<T> interfaceHandle)

Binds the proxy to the given interface handle.

Calls to the proxy will be encoded as messages and sent over the channel underlying the given interface handle.

This object must not already be bound.

The interfaceHandle parameter must not be null. The channel property of the given interfaceHandle must not be null.

Implementation

void bind(InterfaceHandle<T> interfaceHandle) {
  assert(!isBound);
  assert(interfaceHandle != null);
  assert(interfaceHandle.channel != null);
  _reader.bind(interfaceHandle.passChannel());

  _boundCompleter.complete();
  if (onBind != null) {
    onBind();
  }
}