| |
| |
| |
| # ProxyController<T> class |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <p>The control plane for an interface proxy.</p> |
| <p>A proxy controller lets you operate on the local <a href="../package-fidl_fidl/Proxy-class.md">Proxy<T></a> object itself |
| rather than send messages to the remote implementation of the proxy. For |
| example, you can <a href="../package-fidl_fidl/ProxyController/unbind.md">unbind</a> or <a href="../package-fidl_fidl/ProxyController/close.md">close</a> the proxy.</p> |
| <p>You typically obtain a <a href="../package-fidl_fidl/ProxyController-class.md">ProxyController<T></a> object as the <a href="../package-fidl_fidl/Proxy/ctrl.md">Proxy<T>.ctrl</a> |
| property of a <code>TProxy</code> object.</p> |
| <p>Example:</p> |
| <pre class="language-dart"><code class="language-dart">FooProxy foo = new FooProxy(); |
| fooProvider.getFoo(foo.ctrl.request()); |
| </code></pre> |
| |
| |
| |
| |
| ## Constructors |
| |
| [ProxyController](../package-fidl_fidl/ProxyController/ProxyController.md) ({String $serviceName, String $interfaceName}) |
| |
| Creates proxy controller. |
| |
| |
| ## Properties |
| |
| ##### [$interfaceName](../package-fidl_fidl/ProxyController/$interfaceName.md) → String |
| |
| |
| |
| The name of the interface of <code>T</code>. |
| _<span class="feature final">final</span>_ |
| |
| |
| |
| ##### [$serviceName](../package-fidl_fidl/ProxyController/$serviceName.md) → String |
| |
| |
| |
| The service name associated with <code>T</code>, if any. |
| _<span class="feature final">final</span>_ |
| |
| |
| |
| ##### [bound](../package-fidl_fidl/ProxyController/bound.md) → Future<Null> |
| |
| |
| |
| A future that completes when the proxy is bound. |
| _<span class="feature read-only">read-only</span>_ |
| |
| |
| |
| ##### [error](../package-fidl_fidl/ProxyController/error.md) → Future<[ProxyError](../package-fidl_fidl/ProxyError-class.md)> |
| |
| |
| |
| A future that completes when an error is generated by the proxy. |
| _<span class="feature read-only">read-only</span>_ |
| |
| |
| |
| ##### [hashCode](../package-fidl_fidl/ProxyController/hashCode.md) → int |
| |
| |
| |
| The hash code for this object. |
| _<span class="feature read-only">read-only</span><span class="feature inherited">inherited</span>_ |
| |
| |
| |
| ##### [isBound](../package-fidl_fidl/ProxyController/isBound.md) → bool |
| |
| |
| |
| Whether this object is bound to a channel. |
| _<span class="feature read-only">read-only</span>_ |
| |
| |
| |
| ##### [onBind](../package-fidl_fidl/ProxyController/onBind.md) ↔ _VoidCallback |
| |
| |
| |
| Event for binding. |
| _<span class="feature read / write">read / write</span>_ |
| |
| |
| |
| ##### [onClose](../package-fidl_fidl/ProxyController/onClose.md) ↔ _VoidCallback |
| |
| |
| |
| Event for when the binding is closed. |
| _<span class="feature read / write">read / write</span>_ |
| |
| |
| |
| ##### [onConnectionError](../package-fidl_fidl/ProxyController/onConnectionError.md) ↔ _VoidCallback |
| |
| |
| |
| Called when the channel underneath closes. |
| _<span class="feature read / write">read / write</span>_ |
| |
| |
| |
| ##### [onResponse](../package-fidl_fidl/ProxyController/onResponse.md) ↔ [IncomingMessageSink](../package-fidl_fidl/IncomingMessageSink.md) |
| |
| |
| |
| Called whenever this object receives a response on a bound channel. |
| _<span class="feature read / write">read / write</span>_ |
| |
| |
| |
| ##### [onUnbind](../package-fidl_fidl/ProxyController/onUnbind.md) ↔ _VoidCallback |
| |
| |
| |
| Event for unbinding. |
| _<span class="feature read / write">read / write</span>_ |
| |
| |
| |
| ##### [runtimeType](../package-fidl_fidl/ProxyController/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 |
| |
| ##### [bind](../package-fidl_fidl/ProxyController/bind.md)([InterfaceHandle](../package-fidl_fidl/InterfaceHandle-class.md)<T> interfaceHandle) void |
| |
| |
| |
| Binds the proxy to the given interface handle. |
| |
| |
| |
| |
| ##### [close](../package-fidl_fidl/ProxyController/close.md)() void |
| |
| |
| |
| Close the channel bound to the proxy. |
| |
| |
| |
| |
| ##### [getCallback](../package-fidl_fidl/ProxyController/getCallback.md)(int txid) Function |
| |
| |
| |
| Returns the callback associated with the given response message. |
| |
| |
| |
| |
| ##### [noSuchMethod](../package-fidl_fidl/ProxyController/noSuchMethod.md)(Invocation invocation) dynamic |
| |
| |
| |
| Invoked when a non-existent method or property is accessed. |
| _<span class="feature inherited">inherited</span>_ |
| |
| |
| |
| ##### [proxyError](../package-fidl_fidl/ProxyController/proxyError.md)(String message) void |
| |
| |
| |
| Complete the <a href="../package-fidl_fidl/ProxyController/error.md">error</a> future with the given message. |
| |
| |
| |
| |
| ##### [request](../package-fidl_fidl/ProxyController/request.md)() [InterfaceRequest](../package-fidl_fidl/InterfaceRequest-class.md)<T> |
| |
| |
| |
| Creates an interface request whose peer is bound to this interface proxy. |
| |
| |
| |
| |
| ##### [sendMessage](../package-fidl_fidl/ProxyController/sendMessage.md)([OutgoingMessage](../package-fidl_fidl/OutgoingMessage-class.md) message) void |
| |
| |
| |
| Sends the given messages over the bound channel. |
| |
| |
| |
| |
| ##### [sendMessageWithResponse](../package-fidl_fidl/ProxyController/sendMessageWithResponse.md)([OutgoingMessage](../package-fidl_fidl/OutgoingMessage-class.md) message, Function callback) void |
| |
| |
| |
| Sends the given messages over the bound channel and registers a callback |
| to handle the response. |
| |
| |
| |
| |
| ##### [toString](../package-fidl_fidl/ProxyController/toString.md)() String |
| |
| |
| |
| A string representation of this object. |
| _<span class="feature inherited">inherited</span>_ |
| |
| |
| |
| ##### [unbind](../package-fidl_fidl/ProxyController/unbind.md)() [InterfaceHandle](../package-fidl_fidl/InterfaceHandle-class.md)<T> |
| |
| |
| |
| Unbinds the proxy and returns the unbound channel as an interface handle. |
| |
| |
| |
| |
| |
| |
| ## Operators |
| |
| ##### [operator ==](../package-fidl_fidl/ProxyController/operator_equals.md)(Object other) bool |
| |
| |
| |
| The equality operator. |
| _<span class="feature inherited">inherited</span>_ |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |