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