RpcController class
Constructors
Properties
- batchLength → int
-
returns number of types in the batch list
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBatching → bool
-
returns
true
if controller is in batch modeno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sendEvent
→ Event<
RpcObject> -
Event
object to handle send eventsfinal
Methods
-
endBatch(
) → void - only end the batch mode and clear the batch list without sending any thing
-
error(
{required int code, required String message, int? requestId, RpcMeta? data}) → void -
send error of
code
andmessage
with optionalrequestId
if error related to request alsodata
if error has any -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
String method, [dynamic data]) → void -
send notification with
method
andparams
-
request<
T> (String method, [dynamic params]) → Future< T> -
send request with
method
andparams
-
response(
{required int requestId, dynamic data}) → void -
send response of
requestId
anddata
as a returned value or as an result -
sendBatch(
) → void - send all RpcRequest and RpcResponse in the batch list then clear it and end batch mode
-
sendBatchObject(
RpcBatch batch) → void -
send
batch
object -
sendRequestObject<
T> (RpcRequest request) → Future< T> -
send
request
object and wait for its response of typeT
-
sendResponseObject(
RpcResponse response) → void -
send
response
object -
sendRpc(
RpcObjectType rpc) → void -
send any
rpc
like RpcRequest or RpcResponse -
sendRpcObject(
RpcObject object) → void -
send any rpc
object
examples RpcRequest, RpcResponse and RpcBatch -
startBatch(
) → void - start batch mode
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited