public static class APICall.Builder<T extends APICall.Builder>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
params |
Constructor and Description |
---|
Builder(ApiSpec apiSpec) |
Builder(java.lang.String requestType) |
Modifier and Type | Method and Description |
---|---|
APICall |
build() |
JO |
call() |
T |
chain(int chainId) |
T |
chain(java.lang.String chain) |
byte[] |
download() |
BlockResponse |
getBlock() |
java.util.List<BlockResponse> |
getBlocks() |
TransactionResponse |
getCreatedTransaction()
Use to parse responses of create transaction API
|
java.util.List<TransactionResponse> |
getCreatedTransactions()
Response from CreateTransaction calls wraps the transactions inside a transactionJSON object
|
java.lang.String |
getParam(java.lang.String key) |
TransactionResponse |
getTransaction()
Use to parse responses of APIs which return a transaction object like getTransaction
|
java.util.List<TransactionResponse> |
getTransactions()
Use with any API which returns a "transactions" json array
|
java.util.List<TransactionResponse> |
getTransactions(java.lang.String arrayName)
Use in case the response transaction array has a different name
|
boolean |
isParamSet(java.lang.String key) |
boolean |
isRemoteOnly() |
T |
param(java.lang.String key,
boolean value) |
T |
param(java.lang.String key,
byte value) |
T |
param(java.lang.String key,
byte[] value) |
T |
param(java.lang.String key,
byte[][] value) |
T |
param(java.lang.String key,
int... intArray) |
T |
param(java.lang.String key,
int value) |
T |
param(java.lang.String key,
java.util.List<java.lang.String> values) |
T |
param(java.lang.String key,
long... longArray) |
T |
param(java.lang.String key,
long value) |
T |
param(java.lang.String key,
java.lang.String value) |
T |
param(java.lang.String key,
java.lang.String[] values) |
T |
parts(java.lang.String key,
byte[] b) |
T |
remote(java.net.URL url) |
T |
secretPhrase(java.lang.String value) |
T |
setParamValidation(boolean isEnabled) |
T |
trustRemoteCertificate(boolean trustRemoteCertificate) |
T |
unsignedLongParam(java.lang.String key,
long... longArray) |
T |
unsignedLongParam(java.lang.String key,
long value) |
protected final java.util.Map<java.lang.String,java.util.List<java.lang.String>> params
public Builder(java.lang.String requestType)
public Builder(ApiSpec apiSpec)
public T remote(java.net.URL url)
public T trustRemoteCertificate(boolean trustRemoteCertificate)
public boolean isRemoteOnly()
public T setParamValidation(boolean isEnabled)
public T param(java.lang.String key, java.lang.String value)
public T param(java.lang.String key, java.lang.String[] values)
public T param(java.lang.String key, java.util.List<java.lang.String> values)
public T param(java.lang.String key, boolean value)
public T param(java.lang.String key, byte value)
public T param(java.lang.String key, int value)
public T param(java.lang.String key, int... intArray)
public T param(java.lang.String key, long value)
public T param(java.lang.String key, long... longArray)
public T unsignedLongParam(java.lang.String key, long value)
public T unsignedLongParam(java.lang.String key, long... longArray)
public T param(java.lang.String key, byte[] value)
public T param(java.lang.String key, byte[][] value)
public T secretPhrase(java.lang.String value)
public T chain(java.lang.String chain)
public T chain(int chainId)
public java.lang.String getParam(java.lang.String key)
public boolean isParamSet(java.lang.String key)
public T parts(java.lang.String key, byte[] b)
public APICall build()
public JO call()
public byte[] download()
public java.util.List<TransactionResponse> getTransactions()
public java.util.List<TransactionResponse> getTransactions(java.lang.String arrayName)
arrayName
- the name of the transaction arraypublic java.util.List<TransactionResponse> getCreatedTransactions()
public TransactionResponse getTransaction()
public TransactionResponse getCreatedTransaction()
public java.util.List<BlockResponse> getBlocks()
public BlockResponse getBlock()