sendNewInstanceCall method
Send instance creation request
Implementation
@override
Future<ReturnParams> sendNewInstanceCall(
String serviceName,
List<dynamic> args,
String instanceId,
dynamic instance,
) async {
try {
final params = CallParams(
callType: CallType.newInstance,
serviceName: serviceName,
args: proto.encodeArgs(args),
instanceId: instanceId,
instanceType: InstanceType.manual);
final nativeClasses = proto.collectNativeClass(args);
await _readyNativeClass(nativeClasses);
proto.registerProxyInstance(instanceId, instance);
return _bridge.callApi(params);
} catch (e) {
logger.error('[message-sender] New instance call failed:', [e]);
rethrow;
}
}