Class EthereumBlockchainTransactionService
- java.lang.Object
-
- org.exoplatform.wallet.blockchain.service.EthereumBlockchainTransactionService
-
- All Implemented Interfaces:
org.exoplatform.wallet.service.BlockchainTransactionService,org.picocontainer.Startable
public class EthereumBlockchainTransactionService extends Object implements org.exoplatform.wallet.service.BlockchainTransactionService, org.picocontainer.Startable
-
-
Constructor Summary
Constructors Constructor Description EthereumBlockchainTransactionService(org.exoplatform.container.PortalContainer container, org.exoplatform.wallet.service.WalletService walletService, org.exoplatform.commons.api.settings.SettingService settingService, EthereumClientConnector ethereumClientConnector, org.exoplatform.wallet.service.WalletTransactionService transactionService, org.exoplatform.wallet.service.WalletAccountService accountService, org.exoplatform.services.listener.ListenerService listenerService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTransactionToRefreshFromBlockchain(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail)doublegetGasPrice()longgetLastWatchedBlockNumber()booleanhasManagedWalletInTransaction(org.exoplatform.wallet.model.ContractTransactionEvent transactionEvent)org.exoplatform.wallet.model.transaction.TransactionDetailrefreshTransactionFromBlockchain(String transactionHash)voidsaveLastWatchedBlockNumber(long lastWatchedBlockNumber)List<org.exoplatform.wallet.model.transaction.TransactionDetail>sendPendingTransactionsToBlockchain()voidstart()protected voidstartAsync()FuturestartWatchingBlockchain()voidstop()voidstopWatchingBlockchain()
-
-
-
Constructor Detail
-
EthereumBlockchainTransactionService
public EthereumBlockchainTransactionService(org.exoplatform.container.PortalContainer container, org.exoplatform.wallet.service.WalletService walletService, org.exoplatform.commons.api.settings.SettingService settingService, EthereumClientConnector ethereumClientConnector, org.exoplatform.wallet.service.WalletTransactionService transactionService, org.exoplatform.wallet.service.WalletAccountService accountService, org.exoplatform.services.listener.ListenerService listenerService)
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()
- Specified by:
stopin interfaceorg.picocontainer.Startable
-
sendPendingTransactionsToBlockchain
public List<org.exoplatform.wallet.model.transaction.TransactionDetail> sendPendingTransactionsToBlockchain()
- Specified by:
sendPendingTransactionsToBlockchainin interfaceorg.exoplatform.wallet.service.BlockchainTransactionService
-
addTransactionToRefreshFromBlockchain
public void addTransactionToRefreshFromBlockchain(org.exoplatform.wallet.model.transaction.TransactionDetail transactionDetail)
- Specified by:
addTransactionToRefreshFromBlockchainin interfaceorg.exoplatform.wallet.service.BlockchainTransactionService
-
refreshTransactionFromBlockchain
public org.exoplatform.wallet.model.transaction.TransactionDetail refreshTransactionFromBlockchain(String transactionHash)
- Specified by:
refreshTransactionFromBlockchainin interfaceorg.exoplatform.wallet.service.BlockchainTransactionService
-
getGasPrice
public double getGasPrice() throws IOException- Specified by:
getGasPricein interfaceorg.exoplatform.wallet.service.BlockchainTransactionService- Throws:
IOException
-
hasManagedWalletInTransaction
public boolean hasManagedWalletInTransaction(org.exoplatform.wallet.model.ContractTransactionEvent transactionEvent)
- Specified by:
hasManagedWalletInTransactionin interfaceorg.exoplatform.wallet.service.BlockchainTransactionService
-
getLastWatchedBlockNumber
public long getLastWatchedBlockNumber()
- Specified by:
getLastWatchedBlockNumberin interfaceorg.exoplatform.wallet.service.BlockchainTransactionService
-
saveLastWatchedBlockNumber
public void saveLastWatchedBlockNumber(long lastWatchedBlockNumber)
- Specified by:
saveLastWatchedBlockNumberin interfaceorg.exoplatform.wallet.service.BlockchainTransactionService
-
startWatchingBlockchain
public Future startWatchingBlockchain()
- Specified by:
startWatchingBlockchainin interfaceorg.exoplatform.wallet.service.BlockchainTransactionService
-
stopWatchingBlockchain
public void stopWatchingBlockchain()
- Specified by:
stopWatchingBlockchainin interfaceorg.exoplatform.wallet.service.BlockchainTransactionService
-
startAsync
protected void startAsync()
-
-