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
messageis a server→client request (bothmethodandidpresent), route it to its handler and returntrue; 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
handlerfor server→client requests with the givenmethod. 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