Package org.fisco.bcos.sdk.client
Class ClientImpl
java.lang.Object
org.fisco.bcos.sdk.client.ClientImpl
- All Implemented Interfaces:
Client
public class ClientImpl extends java.lang.Object implements Client
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClientImpl(Channel channel)
protected
ClientImpl(GroupManagerService groupManagerService, Channel channel, java.lang.Integer groupId, CryptoSuite cryptoSuite, NodeVersion nodeVersion, EventResource eventResource)
-
Method Summary
Modifier and Type Method Description Call
call(Transaction transaction)
Ledger operation: call contract functions without sending transactionvoid
callAsync(Transaction transaction, RespCallback<Call> callback)
Ledger operation: async call contract functions without sending transactionGenerateGroup
generateGroup(java.lang.Integer groupId, long timestamp, boolean enableFreeStorage, java.util.List<java.lang.String> nodeList, java.lang.String peerIpPort)
Group operation: generate a new groupvoid
generateGroupAsync(java.lang.Integer groupId, long timestamp, boolean enableFreeStorage, java.util.List<java.lang.String> nodeList, java.lang.String peerIpPort, RespCallback<GenerateGroup> callback)
Group operation: async generate a new groupBcosTransactionReceiptsDecoder
getBatchReceiptsByBlockHashAndRange(java.lang.String blockHash, java.lang.String from, java.lang.String count)
get receipt list according to the block hash and the given rangeBcosTransactionReceiptsDecoder
getBatchReceiptsByBlockNumberAndRange(java.math.BigInteger blockNumber, java.lang.String from, java.lang.String count)
get receipt list according to the block number and the given rangeBcosBlock
getBlockByHash(java.lang.String blockHash, boolean returnFullTransactionObjects)
Ledger operation: get block by hashvoid
getBlockByHashAsync(java.lang.String blockHash, boolean returnFullTransactionObjects, RespCallback<BcosBlock> callback)
Ledger operation: async get block by hashBcosBlock
getBlockByNumber(java.math.BigInteger blockNumber, boolean returnFullTransactionObjects)
Ledger operation: get block by block numbervoid
getBlockByNumberAsync(java.math.BigInteger blockNumber, boolean returnFullTransactionObjects, RespCallback<BcosBlock> callback)
Ledger operation: async get block by block numberBlockHash
getBlockHashByNumber(java.math.BigInteger blockNumber)
Ledger operation: get block hash by block numbervoid
getBlockHashByNumberAsync(java.math.BigInteger blockNumber, RespCallback<BlockHash> callback)
Ledger operation: async get block hash by block numberBcosBlockHeader
getBlockHeaderByHash(java.lang.String blockHash, boolean returnSignatureList)
Ledger operation: get block header by block hashvoid
getBlockHeaderByHashAsync(java.lang.String blockHash, boolean returnSignatureList, RespCallback<BcosBlockHeader> callback)
Ledger operation: async get block header by block hashBcosBlockHeader
getBlockHeaderByNumber(java.math.BigInteger blockNumber, boolean returnSignatureList)
get block header by numbervoid
getBlockHeaderByNumberAsync(java.math.BigInteger blockNumber, boolean returnSignatureList, RespCallback<BcosBlockHeader> callback)
java.math.BigInteger
getBlockLimit()
Get cached block heightBlockNumber
getBlockNumber()
Ledger operation: get block numberBlockNumber
getBlockNumber(java.lang.Integer groupId, java.lang.String peerIpAndPort)
void
getBlockNumberAsync(RespCallback<BlockNumber> callback)
Ledger operation: async get block numberNodeVersion
getClientNodeVersion()
Code
getCode(java.lang.String address)
Ledger operation: get codevoid
getCodeAsync(java.lang.String address, RespCallback<Code> callback)
Ledger operation: async get codevoid
getConsensusStates(RespCallback<ConsensusStatus> callback)
Peer operation: async get consensus statusConsensusStatus
getConsensusStatus()
Peer operation: get consensus statusCryptoSuite
getCryptoSuite()
java.lang.Integer
getCryptoType()
EventResource
getEventResource()
Get EventPushMsgHandler and FilterManager.java.lang.Integer
getGroupId()
get groupId of the clientGroupList
getGroupList()
Group operation: get peer group listGroupList
getGroupList(java.lang.String peerIpPort)
Group operation: get peer group listvoid
getGroupListAsync(java.lang.String peerIpPort, RespCallback<GroupList> callback)
Group operation: async get peer group listvoid
getGroupListAsync(RespCallback<GroupList> callback)
Group operation: async get peer group listGroupManagerService
getGroupManagerService()
GroupPeers
getGroupPeers()
Group operation: get group peersGroupPeers
getGroupPeers(java.lang.String peerIpPort)
Group operation: get group peersvoid
getGroupPeersAsync(java.lang.String peerIpPort, RespCallback<GroupPeers> callback)
Group operation: async get group peersvoid
getGroupPeersAsync(RespCallback<GroupPeers> callback)
Group operation: async get group peersNodeIDList
getNodeIDList()
Peer operation: get node idsNodeIDList
getNodeIDList(java.lang.String endpoint)
void
getNodeIDListAsync(RespCallback<NodeIDList> callback)
Peer operation: async get node idsNodeInfo
getNodeInfo(java.lang.String endpoint)
Peer operation: get node informationvoid
getNodeInfoAsync(java.lang.String endpoint, RespCallback<NodeInfo> callback)
Peer operation: get node informationNodeVersion
getNodeVersion()
Peer operation: get node versionNodeVersion
getNodeVersion(java.lang.String ipAndPort)
void
getNodeVersion(RespCallback<NodeVersion> callback)
Peer operation: get node versionObserverList
getObserverList()
Peer operation: get observer node listvoid
getObserverList(RespCallback<ObserverList> callback)
Peer operation: async get observer node listPbftView
getPbftView()
Peer operation: get pbft viewvoid
getPbftViewAsync(RespCallback<PbftView> callback)
Peer operation: async get pbft viewPeers
getPeers()
Peer operation: get connected peersPeers
getPeers(java.lang.String endpoint)
Peer operation: get connected peersvoid
getPeersAsync(RespCallback<Peers> callback)
Peer operation: async get connected peersPendingTransactions
getPendingTransaction()
Ledger operation: get pending transactions in transaction poolvoid
getPendingTransactionAsync(RespCallback<PendingTransactions> callback)
Ledger operation: async get pending transactions in transaction poolPendingTxSize
getPendingTxSize()
Ledger operation: get pending transaction sizevoid
getPendingTxSizeAsync(RespCallback<PendingTxSize> callback)
Ledger operation: async get pending transaction sizeSealerList
getSealerList()
Peer operation: get sealer node listvoid
getSealerListAsync(RespCallback<SealerList> callback)
Peer operation: async get sealer node listSyncStatus
getSyncStatus()
Peer operation: get sync statusvoid
getSyncStatus(RespCallback<SyncStatus> callback)
Peer operation: async get sync statusSystemConfig
getSystemConfigByKey(java.lang.String key)
Peer operation: get system configSystemConfig
getSystemConfigByKey(java.lang.String key, java.lang.String peerIpPort)
Peer operation: get system configvoid
getSystemConfigByKeyAsync(java.lang.String key, java.lang.String peerIpPort, RespCallback<SystemConfig> callback)
Peer operation: async get system configvoid
getSystemConfigByKeyAsync(java.lang.String key, RespCallback<SystemConfig> callback)
Peer operation: async get system configTotalTransactionCount
getTotalTransactionCount()
Ledger operation: get total transaction countvoid
getTotalTransactionCountAsync(RespCallback<TotalTransactionCount> callback)
Ledger operation: async get total transaction countBcosTransaction
getTransactionByBlockHashAndIndex(java.lang.String blockHash, java.math.BigInteger transactionIndex)
void
getTransactionByBlockHashAndIndexAsync(java.lang.String blockHash, java.math.BigInteger transactionIndex, RespCallback<BcosTransaction> callback)
BcosTransaction
getTransactionByBlockNumberAndIndex(java.math.BigInteger blockNumber, java.math.BigInteger transactionIndex)
Ledger operation: get transaction by block number and indexvoid
getTransactionByBlockNumberAndIndexAsync(java.math.BigInteger blockNumber, java.math.BigInteger transactionIndex, RespCallback<BcosTransaction> callback)
Ledger operation: async get transaction by block number and indexBcosTransaction
getTransactionByHash(java.lang.String transactionHash)
Ledger operation: get trnasaction by hashvoid
getTransactionByHashAsync(java.lang.String transactionHash, RespCallback<BcosTransaction> callback)
Ledger operation: async get trnasaction by hashTransactionWithProof
getTransactionByHashWithProof(java.lang.String transactionHash)
Ledger operation: get transaction and proof by hashvoid
getTransactionByHashWithProofAsync(java.lang.String transactionHash, RespCallback<TransactionWithProof> callback)
Ledger operation: async get transaction and proof by hashBcosTransactionReceipt
getTransactionReceipt(java.lang.String transactionHash)
Ledger operation: get transaction receipt by transaction hashvoid
getTransactionReceiptAsync(java.lang.String transactionHash, RespCallback<BcosTransactionReceipt> callback)
Ledger operation: async get transaction receipt by transaction hashTransactionReceiptWithProof
getTransactionReceiptByHashWithProof(java.lang.String transactionHash)
Ledger operation: get transaction receipt and proof by transaction hashvoid
getTransactionReceiptByHashWithProofAsync(java.lang.String transactionHash, RespCallback<TransactionReceiptWithProof> callback)
Ledger operation: async get transaction receipt and proof by transaction hashQueryGroupStatus
queryGroupStatus(java.lang.Integer groupId)
Group operation: query group statusQueryGroupStatus
queryGroupStatus(java.lang.Integer groupId, java.lang.String peerIpPort)
Group operation: query group statusvoid
queryGroupStatusAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<QueryGroupStatus> callback)
Group operation: async query group statusvoid
queryGroupStatusAsync(java.lang.Integer groupId, RespCallback<QueryGroupStatus> callback)
Group operation: async query group statusRecoverGroup
recoverGroup(java.lang.Integer groupId, java.lang.String peerIpPort)
Group operation: recover a groupvoid
recoverGroupAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<RecoverGroup> callback)
Group operation: async recover a groupRemoveGroup
removeGroup(java.lang.Integer groupId, java.lang.String peerIpPort)
Group operation: remove a groupvoid
removeGroupAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<RemoveGroup> callback)
Group operation: async remove a groupSendTransaction
sendRawTransaction(java.lang.String signedTransactionData)
Ledger operation: send transactionSendTransaction
sendRawTransactionAndGetProof(java.lang.String signedTransactionData)
Ledger operation: send raw transaction and get proofvoid
sendRawTransactionAndGetProofAsync(java.lang.String signedTransactionData, RespCallback<SendTransaction> callback)
Ledger operation: async send transaction and get proofTransactionReceipt
sendRawTransactionAndGetReceipt(java.lang.String signedTransactionData)
send transaction and get the receipt as the responsevoid
sendRawTransactionAndGetReceiptAsync(java.lang.String signedTransactionData, TransactionCallback callback)
send transaction to the node, and calls TransactionCallback when get the transaction receipt responseTransactionReceipt
sendRawTransactionAndGetReceiptWithProof(java.lang.String signedTransactionData)
calls sendRawTransactionAndGetProof interface and get the transaction receiptvoid
sendRawTransactionAndGetReceiptWithProofAsync(java.lang.String signedTransactionData, TransactionCallback callback)
calls sendRawTransactionAndGetProof interface, calls TransactionCallback when get the transaction receiptvoid
sendRawTransactionAsync(java.lang.String signedTransactionData, RespCallback<SendTransaction> callback)
Ledger operation: async send transactionStartGroup
startGroup(java.lang.Integer groupId, java.lang.String peerIpPort)
Group operation: start a groupvoid
startGroupAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<StartGroup> callback)
Group operation: async start a groupvoid
stop()
StopGroup
stopGroup(java.lang.Integer groupId, java.lang.String peerIpPort)
Group operation: stop a groupvoid
stopGroupAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<StopGroup> callback)
Group operation: async stop a group
-
Constructor Details
-
ClientImpl
protected ClientImpl(GroupManagerService groupManagerService, Channel channel, java.lang.Integer groupId, CryptoSuite cryptoSuite, NodeVersion nodeVersion, EventResource eventResource) -
ClientImpl
-
-
Method Details
-
getGroupManagerService
- Specified by:
getGroupManagerService
in interfaceClient
-
getCryptoSuite
- Specified by:
getCryptoSuite
in interfaceClient
-
getClientNodeVersion
- Specified by:
getClientNodeVersion
in interfaceClient
-
getCryptoType
public java.lang.Integer getCryptoType()- Specified by:
getCryptoType
in interfaceClient
-
getGroupId
public java.lang.Integer getGroupId()Description copied from interface:Client
get groupId of the client- Specified by:
getGroupId
in interfaceClient
- Returns:
- the groupId
-
sendRawTransaction
Description copied from interface:Client
Ledger operation: send transaction- Specified by:
sendRawTransaction
in interfaceClient
- Parameters:
signedTransactionData
- transaction string- Returns:
- SendTransaction
-
sendRawTransactionAsync
public void sendRawTransactionAsync(java.lang.String signedTransactionData, RespCallback<SendTransaction> callback)Description copied from interface:Client
Ledger operation: async send transaction- Specified by:
sendRawTransactionAsync
in interfaceClient
- Parameters:
signedTransactionData
- transaction stringcallback
- the callback that will be called when receive the response
-
call
Description copied from interface:Client
Ledger operation: call contract functions without sending transaction -
callAsync
Description copied from interface:Client
Ledger operation: async call contract functions without sending transaction -
sendRawTransactionAndGetProof
Description copied from interface:Client
Ledger operation: send raw transaction and get proof- Specified by:
sendRawTransactionAndGetProof
in interfaceClient
- Parameters:
signedTransactionData
- transaction string- Returns:
- a SendTransaction instance
-
sendRawTransactionAndGetProofAsync
public void sendRawTransactionAndGetProofAsync(java.lang.String signedTransactionData, RespCallback<SendTransaction> callback)Description copied from interface:Client
Ledger operation: async send transaction and get proof- Specified by:
sendRawTransactionAndGetProofAsync
in interfaceClient
- Parameters:
signedTransactionData
- transaction stringcallback
- the callback that will be called when receive the response
-
getBlockNumber
Description copied from interface:Client
Ledger operation: get block number- Specified by:
getBlockNumber
in interfaceClient
- Returns:
- block number
-
getBlockNumber
- Specified by:
getBlockNumber
in interfaceClient
-
getBlockNumberAsync
Description copied from interface:Client
Ledger operation: async get block number- Specified by:
getBlockNumberAsync
in interfaceClient
- Parameters:
callback
- the callback that will be called when receive the response
-
getCode
Description copied from interface:Client
Ledger operation: get code -
getCodeAsync
Description copied from interface:Client
Ledger operation: async get code- Specified by:
getCodeAsync
in interfaceClient
- Parameters:
address
- the address stringcallback
- the callback that will be called when receive the response
-
getTotalTransactionCount
Description copied from interface:Client
Ledger operation: get total transaction count- Specified by:
getTotalTransactionCount
in interfaceClient
- Returns:
- TotalTransactionCount
-
getTotalTransactionCountAsync
Description copied from interface:Client
Ledger operation: async get total transaction count- Specified by:
getTotalTransactionCountAsync
in interfaceClient
- Parameters:
callback
- the callback that will be called when receive the response
-
getBlockByHash
Description copied from interface:Client
Ledger operation: get block by hash- Specified by:
getBlockByHash
in interfaceClient
- Parameters:
blockHash
- the hashcode of the blockreturnFullTransactionObjects
- the boolean define the tx is full or not- Returns:
- a block
-
getBlockByHashAsync
public void getBlockByHashAsync(java.lang.String blockHash, boolean returnFullTransactionObjects, RespCallback<BcosBlock> callback)Description copied from interface:Client
Ledger operation: async get block by hash- Specified by:
getBlockByHashAsync
in interfaceClient
- Parameters:
blockHash
- the hashcode of the blockreturnFullTransactionObjects
- the boolean define the tx is full or notcallback
- the callback that will be called when receive the response
-
getBlockByNumber
public BcosBlock getBlockByNumber(java.math.BigInteger blockNumber, boolean returnFullTransactionObjects)Description copied from interface:Client
Ledger operation: get block by block number- Specified by:
getBlockByNumber
in interfaceClient
- Parameters:
blockNumber
- the number of the blockreturnFullTransactionObjects
- the boolean define the tx is full or not- Returns:
- block
-
getBlockByNumberAsync
public void getBlockByNumberAsync(java.math.BigInteger blockNumber, boolean returnFullTransactionObjects, RespCallback<BcosBlock> callback)Description copied from interface:Client
Ledger operation: async get block by block number- Specified by:
getBlockByNumberAsync
in interfaceClient
- Parameters:
blockNumber
- the number of the blockreturnFullTransactionObjects
- the boolean define the tx is full or notcallback
- the callback that will be called when receive the response
-
getBlockHashByNumber
Description copied from interface:Client
Ledger operation: get block hash by block number- Specified by:
getBlockHashByNumber
in interfaceClient
- Parameters:
blockNumber
- the number of the block- Returns:
- block hash
-
getBlockHashByNumberAsync
public void getBlockHashByNumberAsync(java.math.BigInteger blockNumber, RespCallback<BlockHash> callback)Description copied from interface:Client
Ledger operation: async get block hash by block number- Specified by:
getBlockHashByNumberAsync
in interfaceClient
- Parameters:
blockNumber
- the number of the blockcallback
- the callback that will be called when receive the response
-
getBlockHeaderByHash
public BcosBlockHeader getBlockHeaderByHash(java.lang.String blockHash, boolean returnSignatureList)Description copied from interface:Client
Ledger operation: get block header by block hash- Specified by:
getBlockHeaderByHash
in interfaceClient
- Parameters:
blockHash
- the hashcode of the blockreturnSignatureList
- the boolean define the signature list is returned or not- Returns:
- block header
-
getBlockHeaderByHashAsync
public void getBlockHeaderByHashAsync(java.lang.String blockHash, boolean returnSignatureList, RespCallback<BcosBlockHeader> callback)Description copied from interface:Client
Ledger operation: async get block header by block hash- Specified by:
getBlockHeaderByHashAsync
in interfaceClient
- Parameters:
blockHash
- the hashcode of the blockreturnSignatureList
- the boolean define the signature list is returned or notcallback
- the call back instance
-
getBlockHeaderByNumber
public BcosBlockHeader getBlockHeaderByNumber(java.math.BigInteger blockNumber, boolean returnSignatureList)Description copied from interface:Client
get block header by number- Specified by:
getBlockHeaderByNumber
in interfaceClient
- Parameters:
blockNumber
- the number of the blockreturnSignatureList
- the boolean define the signature list is returned or not- Returns:
- the block header response from the blockchain node
-
getBlockHeaderByNumberAsync
public void getBlockHeaderByNumberAsync(java.math.BigInteger blockNumber, boolean returnSignatureList, RespCallback<BcosBlockHeader> callback)- Specified by:
getBlockHeaderByNumberAsync
in interfaceClient
-
getTransactionByHash
Description copied from interface:Client
Ledger operation: get trnasaction by hash- Specified by:
getTransactionByHash
in interfaceClient
- Parameters:
transactionHash
- the hashcode of transaction- Returns:
- transaction
-
getTransactionByHashAsync
public void getTransactionByHashAsync(java.lang.String transactionHash, RespCallback<BcosTransaction> callback)Description copied from interface:Client
Ledger operation: async get trnasaction by hash- Specified by:
getTransactionByHashAsync
in interfaceClient
- Parameters:
transactionHash
- the hashcode of transactioncallback
- the callback that will be called when receive the response
-
getTransactionByHashWithProof
Description copied from interface:Client
Ledger operation: get transaction and proof by hash- Specified by:
getTransactionByHashWithProof
in interfaceClient
- Parameters:
transactionHash
- the hashcode of transaction- Returns:
- transaction with proof
-
getTransactionByHashWithProofAsync
public void getTransactionByHashWithProofAsync(java.lang.String transactionHash, RespCallback<TransactionWithProof> callback)Description copied from interface:Client
Ledger operation: async get transaction and proof by hash- Specified by:
getTransactionByHashWithProofAsync
in interfaceClient
- Parameters:
transactionHash
- the hashcode of transactioncallback
- the callback that will be called when receive the response
-
getTransactionByBlockNumberAndIndex
public BcosTransaction getTransactionByBlockNumberAndIndex(java.math.BigInteger blockNumber, java.math.BigInteger transactionIndex)Description copied from interface:Client
Ledger operation: get transaction by block number and index- Specified by:
getTransactionByBlockNumberAndIndex
in interfaceClient
- Parameters:
blockNumber
- the number of blocktransactionIndex
- the index of transaction- Returns:
- transaction
-
getTransactionByBlockNumberAndIndexAsync
public void getTransactionByBlockNumberAndIndexAsync(java.math.BigInteger blockNumber, java.math.BigInteger transactionIndex, RespCallback<BcosTransaction> callback)Description copied from interface:Client
Ledger operation: async get transaction by block number and index- Specified by:
getTransactionByBlockNumberAndIndexAsync
in interfaceClient
- Parameters:
blockNumber
- the number of blocktransactionIndex
- the index of transactioncallback
- the callback that will be called when receive the response
-
getTransactionByBlockHashAndIndex
public BcosTransaction getTransactionByBlockHashAndIndex(java.lang.String blockHash, java.math.BigInteger transactionIndex)- Specified by:
getTransactionByBlockHashAndIndex
in interfaceClient
-
getTransactionByBlockHashAndIndexAsync
public void getTransactionByBlockHashAndIndexAsync(java.lang.String blockHash, java.math.BigInteger transactionIndex, RespCallback<BcosTransaction> callback)- Specified by:
getTransactionByBlockHashAndIndexAsync
in interfaceClient
-
getTransactionReceipt
Description copied from interface:Client
Ledger operation: get transaction receipt by transaction hash- Specified by:
getTransactionReceipt
in interfaceClient
- Parameters:
transactionHash
- the hashcode of transaction- Returns:
- transaction receipt
-
getTransactionReceiptAsync
public void getTransactionReceiptAsync(java.lang.String transactionHash, RespCallback<BcosTransactionReceipt> callback)Description copied from interface:Client
Ledger operation: async get transaction receipt by transaction hash- Specified by:
getTransactionReceiptAsync
in interfaceClient
- Parameters:
transactionHash
- the hashcode of transactioncallback
- the callback that will be called when receive the response
-
getTransactionReceiptByHashWithProof
public TransactionReceiptWithProof getTransactionReceiptByHashWithProof(java.lang.String transactionHash)Description copied from interface:Client
Ledger operation: get transaction receipt and proof by transaction hash- Specified by:
getTransactionReceiptByHashWithProof
in interfaceClient
- Parameters:
transactionHash
- the hashcode of transaction- Returns:
- receipt and proof
-
getTransactionReceiptByHashWithProofAsync
public void getTransactionReceiptByHashWithProofAsync(java.lang.String transactionHash, RespCallback<TransactionReceiptWithProof> callback)Description copied from interface:Client
Ledger operation: async get transaction receipt and proof by transaction hash- Specified by:
getTransactionReceiptByHashWithProofAsync
in interfaceClient
- Parameters:
transactionHash
- the hashcode of transactioncallback
- the callback that will be called when receive the response
-
getPendingTransaction
Description copied from interface:Client
Ledger operation: get pending transactions in transaction pool- Specified by:
getPendingTransaction
in interfaceClient
- Returns:
- pending transactions
-
getPendingTransactionAsync
Description copied from interface:Client
Ledger operation: async get pending transactions in transaction pool- Specified by:
getPendingTransactionAsync
in interfaceClient
- Parameters:
callback
- the callback that will be called when receive the response
-
getPendingTxSize
Description copied from interface:Client
Ledger operation: get pending transaction size- Specified by:
getPendingTxSize
in interfaceClient
- Returns:
- PendingTxSize
-
getPendingTxSizeAsync
Description copied from interface:Client
Ledger operation: async get pending transaction size- Specified by:
getPendingTxSizeAsync
in interfaceClient
- Parameters:
callback
- the callback that will be called when receive the response
-
getBlockLimit
public java.math.BigInteger getBlockLimit()Description copied from interface:Client
Get cached block height- Specified by:
getBlockLimit
in interfaceClient
- Returns:
- block number
-
generateGroup
public GenerateGroup generateGroup(java.lang.Integer groupId, long timestamp, boolean enableFreeStorage, java.util.List<java.lang.String> nodeList, java.lang.String peerIpPort)Description copied from interface:Client
Group operation: generate a new group- Specified by:
generateGroup
in interfaceClient
- Parameters:
groupId
- the group idtimestamp
- timestampenableFreeStorage
- enable free storagenodeList
- give the ip string list of the nodes in the grouppeerIpPort
- send to the specific peer- Returns:
- generate group reply message
-
generateGroupAsync
public void generateGroupAsync(java.lang.Integer groupId, long timestamp, boolean enableFreeStorage, java.util.List<java.lang.String> nodeList, java.lang.String peerIpPort, RespCallback<GenerateGroup> callback)Description copied from interface:Client
Group operation: async generate a new group- Specified by:
generateGroupAsync
in interfaceClient
- Parameters:
groupId
- the group idtimestamp
- timestampenableFreeStorage
- enable free storagenodeList
- the list of the nodes in the grouppeerIpPort
- send to the specific peercallback
- the callback that will be called when receive the response
-
startGroup
Description copied from interface:Client
Group operation: start a group- Specified by:
startGroup
in interfaceClient
- Parameters:
groupId
- the group idpeerIpPort
- the node that the request sent to- Returns:
- start group rpc reply
-
startGroupAsync
public void startGroupAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<StartGroup> callback)Description copied from interface:Client
Group operation: async start a group- Specified by:
startGroupAsync
in interfaceClient
- Parameters:
groupId
- the group idpeerIpPort
- the node that the request sent tocallback
- the callback that will be called when receive the response
-
stopGroup
Description copied from interface:Client
Group operation: stop a group -
stopGroupAsync
public void stopGroupAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<StopGroup> callback)Description copied from interface:Client
Group operation: async stop a group- Specified by:
stopGroupAsync
in interfaceClient
- Parameters:
groupId
- the group idpeerIpPort
- the node that the request sent tocallback
- the callback that will be called when receive the response
-
removeGroup
Description copied from interface:Client
Group operation: remove a group- Specified by:
removeGroup
in interfaceClient
- Parameters:
groupId
- the group idpeerIpPort
- the node that the request sent to- Returns:
- remove group rpc reply
-
removeGroupAsync
public void removeGroupAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<RemoveGroup> callback)Description copied from interface:Client
Group operation: async remove a group- Specified by:
removeGroupAsync
in interfaceClient
- Parameters:
groupId
- the group idpeerIpPort
- the node that the request sent tocallback
- the callback that will be called when receive the response
-
recoverGroup
Description copied from interface:Client
Group operation: recover a group- Specified by:
recoverGroup
in interfaceClient
- Parameters:
groupId
- the group idpeerIpPort
- the node that the request sent to- Returns:
- recover group rpc reply
-
recoverGroupAsync
public void recoverGroupAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<RecoverGroup> callback)Description copied from interface:Client
Group operation: async recover a group- Specified by:
recoverGroupAsync
in interfaceClient
- Parameters:
groupId
- the group idpeerIpPort
- the node that the request sent tocallback
- the callback that will be called when receive the response
-
queryGroupStatus
Description copied from interface:Client
Group operation: query group status- Specified by:
queryGroupStatus
in interfaceClient
- Parameters:
groupId
- the group id- Returns:
- group status
-
queryGroupStatus
Description copied from interface:Client
Group operation: query group status- Specified by:
queryGroupStatus
in interfaceClient
- Parameters:
groupId
- the group idpeerIpPort
- the node that the request sent to- Returns:
- group status
-
queryGroupStatusAsync
public void queryGroupStatusAsync(java.lang.Integer groupId, RespCallback<QueryGroupStatus> callback)Description copied from interface:Client
Group operation: async query group status- Specified by:
queryGroupStatusAsync
in interfaceClient
- Parameters:
groupId
- the group idcallback
- the callback that will be called when receive the response
-
queryGroupStatusAsync
public void queryGroupStatusAsync(java.lang.Integer groupId, java.lang.String peerIpPort, RespCallback<QueryGroupStatus> callback)Description copied from interface:Client
Group operation: async query group status- Specified by:
queryGroupStatusAsync
in interfaceClient
- Parameters:
groupId
- the group that the request sent topeerIpPort
- the node that the request sent tocallback
- the callback that will be called when receive the response
-
getGroupList
Description copied from interface:Client
Group operation: get peer group list- Specified by:
getGroupList
in interfaceClient
- Returns:
- group list
-
getGroupList
Description copied from interface:Client
Group operation: get peer group list- Specified by:
getGroupList
in interfaceClient
- Parameters:
peerIpPort
- send to the specific peer- Returns:
- group list
-
getGroupListAsync
Description copied from interface:Client
Group operation: async get peer group list- Specified by:
getGroupListAsync
in interfaceClient
- Parameters:
callback
- the callback that will be called when receive the response
-
getGroupListAsync
Description copied from interface:Client
Group operation: async get peer group list- Specified by:
getGroupListAsync
in interfaceClient
- Parameters:
peerIpPort
- send to the specific peercallback
- the callback that will be called when receive the response
-
getGroupPeers
Description copied from interface:Client
Group operation: get group peers- Specified by:
getGroupPeers
in interfaceClient
- Returns:
- group peers
-
getGroupPeers
Description copied from interface:Client
Group operation: get group peers- Specified by:
getGroupPeers
in interfaceClient
- Parameters:
peerIpPort
- the target node of the request- Returns:
- group peers
-
getGroupPeersAsync
Description copied from interface:Client
Group operation: async get group peers- Specified by:
getGroupPeersAsync
in interfaceClient
- Parameters:
callback
- the callback that will be called when receive the response
-
getGroupPeersAsync
Description copied from interface:Client
Group operation: async get group peers- Specified by:
getGroupPeersAsync
in interfaceClient
- Parameters:
peerIpPort
- the target node of the requestcallback
- the callback that will be called when receive the response
-
getPeers
Description copied from interface:Client
Peer operation: get connected peers -
getPeers
Description copied from interface:Client
Peer operation: get connected peers -
getPeersAsync
Description copied from interface:Client
Peer operation: async get connected peers- Specified by:
getPeersAsync
in interfaceClient
- Parameters:
callback
- the callback instance
-
getNodeInfo
Description copied from interface:Client
Peer operation: get node information- Specified by:
getNodeInfo
in interfaceClient
- Parameters:
endpoint
- the target node that receive the request- Returns:
- node information
-
getNodeInfoAsync
Description copied from interface:Client
Peer operation: get node information- Specified by:
getNodeInfoAsync
in interfaceClient
- Parameters:
endpoint
- the target node that receive the requestcallback
- callback the call back instance
-
getNodeIDList
Description copied from interface:Client
Peer operation: get node ids- Specified by:
getNodeIDList
in interfaceClient
- Returns:
- node id list
-
getNodeIDList
- Specified by:
getNodeIDList
in interfaceClient
-
getNodeIDListAsync
Description copied from interface:Client
Peer operation: async get node ids- Specified by:
getNodeIDListAsync
in interfaceClient
- Parameters:
callback
- the callback instance
-
getObserverList
Description copied from interface:Client
Peer operation: get observer node list- Specified by:
getObserverList
in interfaceClient
- Returns:
- observer node list
-
getObserverList
Description copied from interface:Client
Peer operation: async get observer node list- Specified by:
getObserverList
in interfaceClient
- Parameters:
callback
- the callback instance
-
getSealerList
Description copied from interface:Client
Peer operation: get sealer node list- Specified by:
getSealerList
in interfaceClient
- Returns:
- sealer node list
-
getSealerListAsync
Description copied from interface:Client
Peer operation: async get sealer node list- Specified by:
getSealerListAsync
in interfaceClient
- Parameters:
callback
- the callback instance
-
getPbftView
Description copied from interface:Client
Peer operation: get pbft view- Specified by:
getPbftView
in interfaceClient
- Returns:
- pbft view
-
getPbftViewAsync
Description copied from interface:Client
Peer operation: async get pbft view- Specified by:
getPbftViewAsync
in interfaceClient
- Parameters:
callback
- the callback instance
-
getNodeVersion
Description copied from interface:Client
Peer operation: get node version- Specified by:
getNodeVersion
in interfaceClient
- Returns:
- node version
-
getNodeVersion
- Specified by:
getNodeVersion
in interfaceClient
-
getNodeVersion
Description copied from interface:Client
Peer operation: get node version- Specified by:
getNodeVersion
in interfaceClient
- Parameters:
callback
- the callback instance
-
getConsensusStatus
Description copied from interface:Client
Peer operation: get consensus status- Specified by:
getConsensusStatus
in interfaceClient
- Returns:
- consensus status
-
getConsensusStates
Description copied from interface:Client
Peer operation: async get consensus status- Specified by:
getConsensusStates
in interfaceClient
- Parameters:
callback
- the callback instance
-
getSystemConfigByKey
Description copied from interface:Client
Peer operation: get system config- Specified by:
getSystemConfigByKey
in interfaceClient
- Parameters:
key
- the string of key- Returns:
- system config
-
getSystemConfigByKey
Description copied from interface:Client
Peer operation: get system config- Specified by:
getSystemConfigByKey
in interfaceClient
- Parameters:
key
- the string of keypeerIpPort
- the node that the request sent to- Returns:
- system config
-
getSystemConfigByKeyAsync
Description copied from interface:Client
Peer operation: async get system config- Specified by:
getSystemConfigByKeyAsync
in interfaceClient
- Parameters:
key
- the string of keycallback
- the callback instance
-
getSystemConfigByKeyAsync
public void getSystemConfigByKeyAsync(java.lang.String key, java.lang.String peerIpPort, RespCallback<SystemConfig> callback)Description copied from interface:Client
Peer operation: async get system config- Specified by:
getSystemConfigByKeyAsync
in interfaceClient
- Parameters:
key
- the string of keypeerIpPort
- the port string ofcallback
- the callback instance
-
getSyncStatus
Description copied from interface:Client
Peer operation: get sync status- Specified by:
getSyncStatus
in interfaceClient
- Returns:
- sync status
-
getSyncStatus
Description copied from interface:Client
Peer operation: async get sync status- Specified by:
getSyncStatus
in interfaceClient
- Parameters:
callback
- the callback instance
-
sendRawTransactionAndGetReceipt
Description copied from interface:Client
send transaction and get the receipt as the response- Specified by:
sendRawTransactionAndGetReceipt
in interfaceClient
- Parameters:
signedTransactionData
- the transaction data sent to the node- Returns:
- the transaction receipt
-
sendRawTransactionAndGetReceiptAsync
public void sendRawTransactionAndGetReceiptAsync(java.lang.String signedTransactionData, TransactionCallback callback)Description copied from interface:Client
send transaction to the node, and calls TransactionCallback when get the transaction receipt response- Specified by:
sendRawTransactionAndGetReceiptAsync
in interfaceClient
- Parameters:
signedTransactionData
- the transaction sent to the nodecallback
- the TransactionCallback called after get the transaction receipt
-
sendRawTransactionAndGetReceiptWithProofAsync
public void sendRawTransactionAndGetReceiptWithProofAsync(java.lang.String signedTransactionData, TransactionCallback callback)Description copied from interface:Client
calls sendRawTransactionAndGetProof interface, calls TransactionCallback when get the transaction receipt- Specified by:
sendRawTransactionAndGetReceiptWithProofAsync
in interfaceClient
- Parameters:
signedTransactionData
- the transaction sent to the nodecallback
- the TransactionCallback called after get the transaction receipt
-
sendRawTransactionAndGetReceiptWithProof
public TransactionReceipt sendRawTransactionAndGetReceiptWithProof(java.lang.String signedTransactionData)Description copied from interface:Client
calls sendRawTransactionAndGetProof interface and get the transaction receipt- Specified by:
sendRawTransactionAndGetReceiptWithProof
in interfaceClient
- Parameters:
signedTransactionData
- the transaction sent to the node- Returns:
- the transaction receipt
-
getBatchReceiptsByBlockNumberAndRange
public BcosTransactionReceiptsDecoder getBatchReceiptsByBlockNumberAndRange(java.math.BigInteger blockNumber, java.lang.String from, java.lang.String count)Description copied from interface:Client
get receipt list according to the block number and the given range- Specified by:
getBatchReceiptsByBlockNumberAndRange
in interfaceClient
- Parameters:
blockNumber
- the block number of the receiptsfrom
- the start index of the receipt list requiredcount
- the end index of the receipt list required- Returns:
- the receipt list
-
getBatchReceiptsByBlockHashAndRange
public BcosTransactionReceiptsDecoder getBatchReceiptsByBlockHashAndRange(java.lang.String blockHash, java.lang.String from, java.lang.String count)Description copied from interface:Client
get receipt list according to the block hash and the given range- Specified by:
getBatchReceiptsByBlockHashAndRange
in interfaceClient
- Parameters:
blockHash
- the block hash of the receiptsfrom
- the start index of the receipt list requiredcount
- the end index of the receipt list required- Returns:
- the receipt list
-
getEventResource
Description copied from interface:Client
Get EventPushMsgHandler and FilterManager.- Specified by:
getEventResource
in interfaceClient
- Returns:
- EventResource
-
stop
public void stop()
-