RpcObject class abstract

Implementers

Constructors

RpcObject()
const
RpcObject.decode(List<int> bytes, {dynamic separator = '%SEP%'})
Returns RpcBatch if decoded bytes is a List
factory
RpcObject.fromMeta(dynamic meta)
creates RpcObject from Map or List of Map
factory

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

encode({String postfix = '\$sep\$'}) List<int>
Encodes RpcObject to bytes list
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

responseEvent → Event<RpcResponse>
this event used to handle incoming responses
final

Static Methods

auto(RpcObject rpcObject, {MethodRunner? methodRunner, RpcController? controller}) Future<RpcObject?>
Will automatically handle RpcObject and return RpcResponse if exists
handle(RpcObject rpcObject, {RpcBatchHandler? onBatch, RpcRequestHandler? onRequestAll, RpcRequestHandler? onRequest, NotificationHandler? onNotification, RpcResponseHandler? onResponse, ResponseResultHandler? onResult, ResponseErrorHandler? onError}) Future<RpcObject?>
This function is used to detect the type of RpcObject and ease handling it
registerRequest<T>(RpcRequest request) Future<T>
register request and wait for its response