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

bind method

void bind (T impl, InterfaceRequest<T> interfaceRequest)

Binds the given implementation to the given interface request.

Listens for messages on channel underlying the given interface request, decodes them, and dispatches the decoded messages to impl.

This object must not already be bound.

The impl and interfaceRequest parameters must not be null. The channel property of the given interfaceRequest must not be null.


void bind(T impl, InterfaceRequest<T> interfaceRequest) {
  assert(impl != null);
  assert(interfaceRequest != null);
  Channel channel = interfaceRequest.passChannel();
  assert(channel != null);
  _impl = impl;

  if (onBind != null) {