BridgeRequestDispatcher class

Routes incoming server→client requests to registered handlers and writes their replies through an injected sink.

Constructors

BridgeRequestDispatcher({required void sendReply(Map<String, dynamic>)})
Creates a dispatcher that writes JSON-RPC response frames via sendReply.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

maybeHandle(Map<String, dynamic> message) → bool
If message is a server→client request (both method and id present), route it to its handler and return true; the reply is sent through the injected sink once the (possibly async) handler completes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(String method, BridgeRequestHandler handler) → void
Register handler for server→client requests with the given method. Re-registering a method replaces the previous handler.
toString() → String
A string representation of this object.
inherited
unregister(String method) → void
Remove the handler for method, if any.

Operators

operator ==(Object other) → bool
The equality operator.
inherited