Package foundation.icon.icx
Class Call.Builder
- java.lang.Object
-
- foundation.icon.icx.Call.Builder
-
public static class Call.Builder extends java.lang.Object
Builder for creating immutable object of Call.
It has following properties
-from(Address)
the request account
-to(Address)
the SCORE address to call
-method(String)
the method name to call
-params(Object)
the parameter of call
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Call<RpcItem>
build()
Builds with RpcItem.<T> Call<T>
buildWith(java.lang.Class<T> responseType)
Builds with User defined class.Call.Builder
from(Address from)
Call.Builder
method(java.lang.String method)
Call.Builder
params(RpcItem params)
<T> Call.Builder
params(T params)
Call.Builder
to(Address to)
-
-
-
Method Detail
-
from
public Call.Builder from(Address from)
-
to
public Call.Builder to(Address to)
-
method
public Call.Builder method(java.lang.String method)
-
params
public <T> Call.Builder params(T params)
-
params
public Call.Builder params(RpcItem params)
-
build
public Call<RpcItem> build()
Builds with RpcItem. that means the return type is RpcItem- Returns:
- Call
-
buildWith
public <T> Call<T> buildWith(java.lang.Class<T> responseType)
Builds with User defined class. an object of the class would be returned- Type Parameters:
T
- responseType- Parameters:
responseType
- Response type- Returns:
- Call
-
-