blob: 3e8eab88ac3204da9131fd996b614a1f07026ecc [file] [log] [blame] [view]
# 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&lt;T&gt;</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&lt;T&gt;</a> object as the <a href="../package-fidl_fidl/Proxy/ctrl.md">Proxy&lt;T&gt;.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) &#8594; String
The name of the interface of <code>T</code>.
_final_
##### [$serviceName](../package-fidl_fidl/ProxyController/$serviceName.md) &#8594; String
The service name associated with <code>T</code>, if any.
_final_
##### [bound](../package-fidl_fidl/ProxyController/bound.md) &#8594; Future&lt;Null>
A future that completes when the proxy is bound.
_read-only_
##### [error](../package-fidl_fidl/ProxyController/error.md) &#8594; Future&lt;[ProxyError](../package-fidl_fidl/ProxyError-class.md)>
A future that completes when an error is generated by the proxy.
_read-only_
##### [hashCode](../package-fidl_fidl/ProxyController/hashCode.md) &#8594; int
The hash code for this object.
_read-only, inherited_
##### [isBound](../package-fidl_fidl/ProxyController/isBound.md) &#8594; bool
Whether this object is bound to a channel.
_read-only_
##### [onBind](../package-fidl_fidl/ProxyController/onBind.md) &#8596; _VoidCallback
Event for binding.
_read / write_
##### [onClose](../package-fidl_fidl/ProxyController/onClose.md) &#8596; _VoidCallback
Event for when the binding is closed.
_read / write_
##### [onConnectionError](../package-fidl_fidl/ProxyController/onConnectionError.md) &#8596; _VoidCallback
Called when the channel underneath closes.
_read / write_
##### [onResponse](../package-fidl_fidl/ProxyController/onResponse.md) &#8596; [IncomingMessageSink](../package-fidl_fidl/IncomingMessageSink.md)
Called whenever this object receives a response on a bound channel.
_read / write_
##### [onUnbind](../package-fidl_fidl/ProxyController/onUnbind.md) &#8596; _VoidCallback
Event for unbinding.
_read / write_
##### [runtimeType](../package-fidl_fidl/ProxyController/runtimeType.md) &#8594; Type
A representation of the runtime type of the object.
_read-only, inherited_
## Methods
##### [bind](../package-fidl_fidl/ProxyController/bind.md)([InterfaceHandle](../package-fidl_fidl/InterfaceHandle-class.md)&lt;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.
_inherited_
##### [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)&lt;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.
_inherited_
##### [unbind](../package-fidl_fidl/ProxyController/unbind.md)() [InterfaceHandle](../package-fidl_fidl/InterfaceHandle-class.md)&lt;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.
_inherited_