| |
| |
| |
| # InterfaceHandle<T> class |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <p>A channel over which messages from interface T can be sent.</p> |
| <p>An interface handle holds a <a href="../package-fidl_fidl/InterfaceHandle/channel.md">channel</a> whose peer expects to receive messages |
| from the FIDL interface T. The channel held by an interface handle is not |
| currently bound, which means messages cannot yet be exchanged with the |
| channel's peer.</p> |
| <p>To send messages over the channel, bind the interface handle to a <code>TProxy</code> |
| object using use <a href="../package-fidl_fidl/ProxyController/bind.md">ProxyController<T>.bind</a> method on the proxy's |
| <a href="../package-fidl_fidl/Proxy/ctrl.md">Proxy<T>.ctrl</a> property.</p> |
| <p>Example:</p> |
| <pre class="language-dart"><code class="language-dart">InterfaceHandle<T> fooHandle = [...] |
| FooProxy foo = new FooProxy(); |
| foo.ctrl.bind(fooHandle); |
| foo.bar(); |
| </code></pre> |
| <p>To obtain an interface handle to send over a channel, used the |
| <a href="../package-fidl_fidl/Binding/wrap.md">Binding<T>.wrap</a> method on an object of type <code>TBinding</code>.</p> |
| <p>Example:</p> |
| <pre class="language-dart"><code class="language-dart">class FooImpl extends Foo { |
| final FooBinding _binding = new FooBinding(); |
| |
| InterfaceHandle<T> getInterfaceHandle() => _binding.wrap(this); |
| |
| @override |
| void bar() { |
| print('Received bar message.'); |
| } |
| } |
| </code></pre> |
| |
| |
| |
| |
| ## Constructors |
| |
| [InterfaceHandle](../package-fidl_fidl/InterfaceHandle/InterfaceHandle.md) ([Channel](../zircon/Channel-class.md) _channel) |
| |
| Creates an interface handle that wraps the given channel. |
| |
| |
| ## Properties |
| |
| ##### [channel](../package-fidl_fidl/InterfaceHandle/channel.md) → [Channel](../zircon/Channel-class.md) |
| |
| |
| |
| The underlying channel messages will be sent over when the interface |
| handle is bound to a <a href="../package-fidl_fidl/Proxy-class.md">Proxy</a>. |
| _<span class="feature read-only">read-only</span>_ |
| |
| |
| |
| ##### [hashCode](../package-fidl_fidl/InterfaceHandle/hashCode.md) → int |
| |
| |
| |
| The hash code for this object. |
| _<span class="feature read-only">read-only</span><span class="feature inherited">inherited</span>_ |
| |
| |
| |
| ##### [runtimeType](../package-fidl_fidl/InterfaceHandle/runtimeType.md) → Type |
| |
| |
| |
| A representation of the runtime type of the object. |
| _<span class="feature read-only">read-only</span><span class="feature inherited">inherited</span>_ |
| |
| |
| |
| |
| |
| ## Methods |
| |
| ##### [close](../package-fidl_fidl/InterfaceHandle/close.md)() void |
| |
| |
| |
| Closes the underlying channel. |
| |
| |
| |
| |
| ##### [noSuchMethod](../package-fidl_fidl/InterfaceHandle/noSuchMethod.md)(Invocation invocation) dynamic |
| |
| |
| |
| Invoked when a non-existent method or property is accessed. |
| _<span class="feature inherited">inherited</span>_ |
| |
| |
| |
| ##### [passChannel](../package-fidl_fidl/InterfaceHandle/passChannel.md)() [Channel](../zircon/Channel-class.md) |
| |
| |
| |
| Returns <a href="../package-fidl_fidl/InterfaceHandle/channel.md">channel</a> and sets <a href="../package-fidl_fidl/InterfaceHandle/channel.md">channel</a> to <code>null</code>. |
| |
| |
| |
| |
| ##### [toString](../package-fidl_fidl/InterfaceHandle/toString.md)() String |
| |
| |
| |
| A string representation of this object. |
| _<span class="feature inherited">inherited</span>_ |
| |
| |
| |
| |
| |
| ## Operators |
| |
| ##### [operator ==](../package-fidl_fidl/InterfaceHandle/operator_equals.md)(Object other) bool |
| |
| |
| |
| The equality operator. |
| _<span class="feature inherited">inherited</span>_ |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |