public class EthereumClientConnector extends Object implements ExoBlockchainTransactionService, org.picocontainer.Startable
| Constructor and Description |
|---|
EthereumClientConnector(ClassLoader webappClassLoader) |
| Modifier and Type | Method and Description |
|---|---|
org.web3j.protocol.core.methods.response.EthBlock.Block |
getBlock(String blockHash)
Get block by hash
|
Set<String> |
getContractTransactions(String contractsAddress,
long fromBlock,
long toBlock)
Retrieve from blockchain transaction hashes from contract starting from a
block number to a block number
|
long |
getLastestBlockNumber() |
org.web3j.protocol.core.methods.response.Transaction |
getTransaction(String transactionHash)
Get transaction by hash
|
org.web3j.protocol.core.methods.response.TransactionReceipt |
getTransactionReceipt(String transactionHash)
Get transaction receipt by hash
|
org.web3j.protocol.Web3j |
getWeb3j() |
ClassLoader |
getWebappClassLoader() |
boolean |
isConnected() |
void |
start() |
void |
start(String websocketURL) |
void |
stop() |
void |
waitConnection() |
public EthereumClientConnector(ClassLoader webappClassLoader)
public ClassLoader getWebappClassLoader()
getWebappClassLoader in interface ExoBlockchainTransactionServicepublic void start()
start in interface org.picocontainer.Startablepublic void start(String websocketURL)
public void stop()
stop in interface org.picocontainer.Startablepublic org.web3j.protocol.core.methods.response.Transaction getTransaction(String transactionHash) throws InterruptedException
transactionHash - transaction hash to retrieveInterruptedException - when Blockchain request is interruptedpublic org.web3j.protocol.core.methods.response.EthBlock.Block getBlock(String blockHash) throws InterruptedException
blockHash - block hash to retrieveInterruptedException - when Blockchain request is interruptedpublic org.web3j.protocol.core.methods.response.TransactionReceipt getTransactionReceipt(String transactionHash) throws InterruptedException
transactionHash - transaction hash to retrieveInterruptedException - when Blockchain request is interruptedpublic boolean isConnected()
public long getLastestBlockNumber()
throws InterruptedException,
IOException
InterruptedException - when waiting for blockchain is interruptedIOException - when error sending transaction on blockchainpublic Set<String> getContractTransactions(String contractsAddress, long fromBlock, long toBlock) throws IOException, InterruptedException
contractsAddress - blockchain contract addressfromBlock - search starting from this block numbertoBlock - search until this block numberSet of transaction hashesIOException - if an error happens while getting information from
blockchainInterruptedException - if an interruption is made while getting
information from blockchainpublic org.web3j.protocol.Web3j getWeb3j()
throws InterruptedException
InterruptedExceptionpublic void waitConnection()
throws InterruptedException
InterruptedExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.