本文整理汇总了Java中com.thetransactioncompany.jsonrpc2.JSONRPC2Request.toString方法的典型用法代码示例。如果您正苦于以下问题:Java JSONRPC2Request.toString方法的具体用法?Java JSONRPC2Request.toString怎么用?Java JSONRPC2Request.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.thetransactioncompany.jsonrpc2.JSONRPC2Request
的用法示例。
在下文中一共展示了JSONRPC2Request.toString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doInBackground
import com.thetransactioncompany.jsonrpc2.JSONRPC2Request; //导入方法依赖的package包/类
@Override
protected Boolean doInBackground(Request... params) {
Request request = params[0];
JSONRPC2Request jsonRpcRequest = new JSONRPC2Request(
request.methodName, request.params, request.id);
if (request.auth != null) {
jsonRpcRequest.appendNonStdAttribute(UrlParams.AUTH,
request.auth);
}
mClass = request.clazz;
mListener = request.listener;
String JSONStr = jsonRpcRequest.toJSONString();
String ReqStr = jsonRpcRequest.toString();
Boolean success = sendRequest(jsonRpcRequest, request.isArray);
removeRequest(request.requestId);
return success;
}
示例2: createTxRequest
import com.thetransactioncompany.jsonrpc2.JSONRPC2Request; //导入方法依赖的package包/类
public static String createTxRequest(String from, String to, long wei) {
Map<String, Object> params = new HashMap<>();
Integer id = requestId++;
JSONRPC2Request reqOut = new JSONRPC2Request(METHOD_ETH_ACCOUNTS, params, id);
System.out.println("Request: " + reqOut.toString());
return reqOut.toString();
}
示例3: createRequest
import com.thetransactioncompany.jsonrpc2.JSONRPC2Request; //导入方法依赖的package包/类
public static String createRequest(String method) {
Map<String, Object> params = new HashMap<>();
Integer id = requestId++;
JSONRPC2Request reqOut = new JSONRPC2Request(method, params, id);
System.out.println("Request: " + reqOut.toString());
return reqOut.toString();
}
示例4: createListAccountRequest
import com.thetransactioncompany.jsonrpc2.JSONRPC2Request; //导入方法依赖的package包/类
public static String createListAccountRequest(String method) {
List<Object> params = new ArrayList<>();
Integer id = requestId++;
JSONRPC2Request reqOut = new JSONRPC2Request(method, params, id);
System.out.println("Request: " + reqOut.toString());
return reqOut.toString();
}
示例5: createNewAccountRequest
import com.thetransactioncompany.jsonrpc2.JSONRPC2Request; //导入方法依赖的package包/类
public static String createNewAccountRequest(String method, String password) {
List<Object> params = new ArrayList<>();
params.add(password);
Integer id = requestId++;
JSONRPC2Request reqOut = new JSONRPC2Request(method, params, id);
System.out.println("Request: " + reqOut.toString());
return reqOut.toString();
}
示例6: createUnlockAccountRequest
import com.thetransactioncompany.jsonrpc2.JSONRPC2Request; //导入方法依赖的package包/类
public static String createUnlockAccountRequest(String method, String address, String password, int timeInSeconds) {
List<Object> params = new ArrayList<>();
params.add(address);
params.add(password);
params.add(timeInSeconds);
Integer id = requestId++;
JSONRPC2Request reqOut = new JSONRPC2Request(method, params, id);
System.out.println("Request: " + reqOut.toString());
return reqOut.toString();
}
示例7: createBalanceRequest
import com.thetransactioncompany.jsonrpc2.JSONRPC2Request; //导入方法依赖的package包/类
public static String createBalanceRequest(String address, String blockParameter, String method) {
List<Object> params = new ArrayList<>();
params.add(address);
params.add(blockParameter);
Integer id = requestId++;
JSONRPC2Request reqOut = new JSONRPC2Request(method, params, id);
System.out.println("Request: " + reqOut.toString());
return reqOut.toString();
}