public class EthereumClientConnector extends Object implements org.picocontainer.Startable
| Constructor and Description |
|---|
EthereumClientConnector(EthereumWalletService ethereumWalletService,
org.exoplatform.container.ExoContainer container) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeSettings(GlobalSettings newGlobalSettings)
Change currently used globalSettings and re-init
|
org.web3j.protocol.core.methods.response.EthBlock.Block |
getBlock(String blockHash)
Get block by hash
|
protected String |
getConnectionFailedMessage() |
int |
getConnectionInterruptionCount() |
long |
getLastBlockNumberOnStartupTime() |
long |
getLastWatchedBlockNumber() |
org.web3j.protocol.core.methods.response.Transaction |
getTransaction(String transactionHash)
Get transaction by hash
|
int |
getTransactionQueueMaxSize() |
int |
getTransactionQueueSize() |
org.web3j.protocol.core.methods.response.TransactionReceipt |
getTransactionReceipt(String transactionHash)
Get transaction receipt by hash
|
int |
getTransactionsCountPerBlock() |
int |
getWatchedTransactionCount() |
long |
getWatchingBlockchainStartTime() |
String |
getWebsocketProviderURL()
Returns used Websocket URL
|
boolean |
isConnected() |
void |
setLastWatchedBlockNumber(long lastWatchedBlockNumber) |
void |
start() |
void |
startListeninigToTransactions()
Add subscription on Ethereum network to listen on all new transactions
|
void |
stop() |
void |
stopListeninigToTransactions()
Unsubscribe from Ethereum network transaction events
|
public EthereumClientConnector(EthereumWalletService ethereumWalletService, org.exoplatform.container.ExoContainer container)
public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void startListeninigToTransactions()
public void stopListeninigToTransactions()
public 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 String getWebsocketProviderURL()
public void changeSettings(GlobalSettings newGlobalSettings)
newGlobalSettings - newly saved global settingspublic boolean isConnected()
public long getLastWatchedBlockNumber()
public int getConnectionInterruptionCount()
public void setLastWatchedBlockNumber(long lastWatchedBlockNumber)
lastWatchedBlockNumber - last watched block numberpublic int getTransactionQueueSize()
public long getWatchingBlockchainStartTime()
public int getWatchedTransactionCount()
public int getTransactionQueueMaxSize()
public long getLastBlockNumberOnStartupTime()
public int getTransactionsCountPerBlock()
protected String getConnectionFailedMessage()
Copyright © 2003–2019 eXo Platform SAS. All rights reserved.