makeRPCResponsePackage method
DataPackage
makeRPCResponsePackage(
- RemoteFunctionRunnableResult<
T> result, - DataPackage rpcRequest
Implementation
DataPackage makeRPCResponsePackage(
RemoteFunctionRunnableResult<T> result, DataPackage rpcRequest) {
DataPackage responsePackage = prepareResponsePackage(result.getStatus(), rpcRequest);
T? returnValue = result.getReturnValue();
if(returnValue != null)
{
print("Return type " + this._returnType.runtimeType.toString());
Mutator<T> mutator = TypeMapping().getMutator(this._returnType);
mutator.setter(responsePackage, returnValue);
}
return responsePackage;
}