Class AssembleTransactionProcessor
java.lang.Object
org.fisco.bcos.sdk.transaction.manager.TransactionProcessor
org.fisco.bcos.sdk.transaction.manager.AssembleTransactionProcessor
- All Implemented Interfaces:
AssembleTransactionProcessorInterface
,TransactionProcessorInterface
public class AssembleTransactionProcessor extends TransactionProcessor implements AssembleTransactionProcessorInterface
ContractlessTransactionManager @Description: ContractlessTransactionManager
-
Field Summary
Fields Modifier and Type Field Description protected ABICodec
abiCodec
protected static org.slf4j.Logger
log
protected TransactionDecoderInterface
transactionDecoder
protected TransactionPusherInterface
transactionPusher
Fields inherited from class org.fisco.bcos.sdk.transaction.manager.TransactionProcessor
chainId, client, cryptoKeyPair, cryptoSuite, groupId, transactionBuilder, transactionEncoder
-
Constructor Summary
Constructors Constructor Description AssembleTransactionProcessor(Client client, CryptoKeyPair cryptoKeyPair, java.lang.Integer groupId, java.lang.String chainId, ContractLoader contractLoader)
-
Method Summary
Modifier and Type Method Description CallResponse
callAndGetResponse(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.lang.String data)
java.lang.String
createSignedConstructor(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params)
TransactionReceipt
deployAndGetReceipt(java.lang.String data)
TransactionResponse
deployAndGetResponse(java.lang.String abi, java.lang.String signedData)
TransactionResponse
deployAndGetResponse(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params)
TransactionResponse
deployAndGetResponseWithStringParams(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.String> params)
java.util.concurrent.CompletableFuture<TransactionReceipt>
deployAsync(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params)
void
deployAsync(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params, TransactionCallback callback)
TransactionResponse
deployByContractLoader(java.lang.String contractName, java.util.List<java.lang.Object> args)
Deploy by bin and abi files.void
deployByContractLoaderAsync(java.lang.String contractName, java.util.List<java.lang.Object> args, TransactionCallback callback)
void
deployOnly(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params)
java.lang.String
encodeFunction(java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params)
CallResponse
sendCall(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> paramsList)
CallResponse
sendCall(CallRequest callRequest)
CallResponse
sendCallByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> args)
CallResponse
sendCallWithStringParams(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.String> paramsList)
TransactionReceipt
sendTransactionAndGetReceiptByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> args)
void
sendTransactionAndGetReceiptByContractLoaderAsync(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> args, TransactionCallback callback)
TransactionResponse
sendTransactionAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.lang.String data)
TransactionResponse
sendTransactionAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params)
TransactionResponse
sendTransactionAndGetResponseByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> funcParams)
java.util.concurrent.CompletableFuture<TransactionReceipt>
sendTransactionAsync(java.lang.String signedData)
void
sendTransactionAsync(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params, TransactionCallback callback)
void
sendTransactionAsync(java.lang.String signedTransaction, TransactionCallback callback)
void
sendTransactionOnly(java.lang.String signedData)
TransactionResponse
sendTransactionWithStringParamsAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.String> params)
Methods inherited from class org.fisco.bcos.sdk.transaction.manager.TransactionProcessor
createSignedTransaction, executeCall, executeCall, sendTransactionAndGetReceipt, sendTransactionAsync
-
Field Details
-
log
protected static org.slf4j.Logger log -
transactionDecoder
-
transactionPusher
-
abiCodec
-
-
Constructor Details
-
AssembleTransactionProcessor
public AssembleTransactionProcessor(Client client, CryptoKeyPair cryptoKeyPair, java.lang.Integer groupId, java.lang.String chainId, ContractLoader contractLoader)
-
-
Method Details
-
deployOnly
public void deployOnly(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params) throws ABICodecException- Specified by:
deployOnly
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
-
deployAndGetReceipt
- Specified by:
deployAndGetReceipt
in interfaceAssembleTransactionProcessorInterface
-
deployAndGetResponse
- Specified by:
deployAndGetResponse
in interfaceAssembleTransactionProcessorInterface
-
deployAndGetResponse
public TransactionResponse deployAndGetResponse(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params) throws ABICodecException- Specified by:
deployAndGetResponse
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
-
deployAndGetResponseWithStringParams
public TransactionResponse deployAndGetResponseWithStringParams(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.String> params) throws ABICodecException- Specified by:
deployAndGetResponseWithStringParams
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
-
deployAsync
public void deployAsync(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params, TransactionCallback callback) throws ABICodecException- Specified by:
deployAsync
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
-
deployAsync
public java.util.concurrent.CompletableFuture<TransactionReceipt> deployAsync(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params) throws ABICodecException- Specified by:
deployAsync
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
-
deployByContractLoader
public TransactionResponse deployByContractLoader(java.lang.String contractName, java.util.List<java.lang.Object> args) throws ABICodecException, TransactionBaseExceptionDeploy by bin and abi files. Should init with contractLoader.- Specified by:
deployByContractLoader
in interfaceAssembleTransactionProcessorInterface
- Parameters:
contractName
- the contract nameargs
- the params when deploy a contract- Returns:
- the transaction response
- Throws:
TransactionBaseException
- send transaction exceptionedABICodecException
- abi encode exceptionedNoSuchTransactionFileException
- Files related to abi codec were not found
-
deployByContractLoaderAsync
public void deployByContractLoaderAsync(java.lang.String contractName, java.util.List<java.lang.Object> args, TransactionCallback callback) throws ABICodecException, NoSuchTransactionFileException- Specified by:
deployByContractLoaderAsync
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
NoSuchTransactionFileException
-
sendTransactionOnly
public void sendTransactionOnly(java.lang.String signedData)- Specified by:
sendTransactionOnly
in interfaceAssembleTransactionProcessorInterface
-
sendTransactionAndGetResponse
public TransactionResponse sendTransactionAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.lang.String data) throws TransactionBaseException, ABICodecException- Specified by:
sendTransactionAndGetResponse
in interfaceAssembleTransactionProcessorInterface
- Throws:
TransactionBaseException
ABICodecException
-
sendTransactionAndGetResponse
public TransactionResponse sendTransactionAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params) throws ABICodecException, TransactionBaseException- Specified by:
sendTransactionAndGetResponse
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
TransactionBaseException
-
sendTransactionWithStringParamsAndGetResponse
public TransactionResponse sendTransactionWithStringParamsAndGetResponse(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.String> params) throws ABICodecException, TransactionBaseException- Specified by:
sendTransactionWithStringParamsAndGetResponse
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
TransactionBaseException
-
sendTransactionAndGetReceiptByContractLoader
public TransactionReceipt sendTransactionAndGetReceiptByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> args) throws ABICodecException, TransactionBaseException- Specified by:
sendTransactionAndGetReceiptByContractLoader
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
TransactionBaseException
-
sendTransactionAndGetResponseByContractLoader
public TransactionResponse sendTransactionAndGetResponseByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> funcParams) throws ABICodecException, TransactionBaseException- Specified by:
sendTransactionAndGetResponseByContractLoader
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
TransactionBaseException
-
sendTransactionAsync
- Specified by:
sendTransactionAsync
in interfaceAssembleTransactionProcessorInterface
-
sendTransactionAsync
public void sendTransactionAsync(java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params, TransactionCallback callback) throws TransactionBaseException, ABICodecException- Specified by:
sendTransactionAsync
in interfaceAssembleTransactionProcessorInterface
- Throws:
TransactionBaseException
ABICodecException
-
sendTransactionAsync
public java.util.concurrent.CompletableFuture<TransactionReceipt> sendTransactionAsync(java.lang.String signedData)- Specified by:
sendTransactionAsync
in interfaceAssembleTransactionProcessorInterface
-
sendTransactionAndGetReceiptByContractLoaderAsync
public void sendTransactionAndGetReceiptByContractLoaderAsync(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> args, TransactionCallback callback) throws ABICodecException, TransactionBaseException- Specified by:
sendTransactionAndGetReceiptByContractLoaderAsync
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
TransactionBaseException
-
sendCallByContractLoader
public CallResponse sendCallByContractLoader(java.lang.String contractName, java.lang.String contractAddress, java.lang.String functionName, java.util.List<java.lang.Object> args) throws TransactionBaseException, ABICodecException- Specified by:
sendCallByContractLoader
in interfaceAssembleTransactionProcessorInterface
- Throws:
TransactionBaseException
ABICodecException
-
sendCall
public CallResponse sendCall(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> paramsList) throws TransactionBaseException, ABICodecException- Specified by:
sendCall
in interfaceAssembleTransactionProcessorInterface
- Throws:
TransactionBaseException
ABICodecException
-
sendCall
public CallResponse sendCall(CallRequest callRequest) throws TransactionBaseException, ABICodecException- Specified by:
sendCall
in interfaceAssembleTransactionProcessorInterface
- Throws:
TransactionBaseException
ABICodecException
-
sendCallWithStringParams
public CallResponse sendCallWithStringParams(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.String> paramsList) throws TransactionBaseException, ABICodecException- Specified by:
sendCallWithStringParams
in interfaceAssembleTransactionProcessorInterface
- Throws:
TransactionBaseException
ABICodecException
-
callAndGetResponse
public CallResponse callAndGetResponse(java.lang.String from, java.lang.String to, java.lang.String abi, java.lang.String functionName, java.lang.String data) throws ABICodecException, TransactionBaseException -
createSignedConstructor
public java.lang.String createSignedConstructor(java.lang.String abi, java.lang.String bin, java.util.List<java.lang.Object> params) throws ABICodecException- Specified by:
createSignedConstructor
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
-
encodeFunction
public java.lang.String encodeFunction(java.lang.String abi, java.lang.String functionName, java.util.List<java.lang.Object> params) throws ABICodecException- Specified by:
encodeFunction
in interfaceAssembleTransactionProcessorInterface
- Throws:
ABICodecException
-