@Test public void testStopExecutorOnShutdown() { ScheduledExecutorService scheduledExecutorService = mock(ScheduledExecutorService.class); Web3j web3j = Web3j.build( mock(Web3jService.class), 10, scheduledExecutorService ); web3j.shutdown(); verify(scheduledExecutorService).shutdown(); }
@Override public void shutdown() { scheduledExecutorService.shutdown(); }
JsonRpc2_0Web3j implements Web3j { @Override public void shutdown() { scheduledExecutorService.shutdown(); } }
JsonRpc2_0Web3j implements Web3j { @Override public void shutdown() { scheduledExecutorService.shutdown(); } JsonRpc2_0Web3j(Web3jService web3jService);  JsonRpc2_0Web3j(
            Web3jService web3jService, long pollingInterval,
            ScheduledExecutorService scheduledExecutorService); }
JsonRpc2_0Web3j implements Web3j { @Override public void shutdown() { scheduledExecutorService.shutdown(); } JsonRpc2_0Web3j(Web3jService web3jService);  JsonRpc2_0Web3j(
            Web3jService web3jService, long pollingInterval,
            ScheduledExecutorService scheduledExecutorService); @Override Request<?, EthAccounts> debugGetModifiedAccountsByNumber(int start, int end); @Override Request<?, TxPoolContent> txPoolContent(); @Override Request<?, Web3ClientVersion> web3ClientVersion(); @Override Request<?, Web3Sha3> web3Sha3(String data); @Override Request<?, NetVersion> netVersion(); @Override Request<?, NetListening> netListening(); @Override Request<?, NetPeerCount> netPeerCount(); @Override Request<?, EthProtocolVersion> ethProtocolVersion(); @Override Request<?, EthCoinbase> ethCoinbase(); @Override Request<?, EthSyncing> ethSyncing(); @Override Request<?, EthMining> ethMining(); @Override Request<?, EthHashrate> ethHashrate(); @Override Request<?, EthGasPrice> ethGasPrice(); @Override Request<?, EthAccounts> ethAccounts(); @Override Request<?, EthBlockNumber> ethBlockNumber(); @Override Request<?, EthGetBalance> ethGetBalance(
            String address, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetStorageAt> ethGetStorageAt(
            String address, BigInteger position, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetTransactionCount> ethGetTransactionCount(
            String address, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetBlockTransactionCountByHash> ethGetBlockTransactionCountByHash(
            String blockHash); @Override Request<?, EthGetBlockTransactionCountByNumber> ethGetBlockTransactionCountByNumber(
            DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetUncleCountByBlockHash> ethGetUncleCountByBlockHash(String blockHash); @Override Request<?, EthGetUncleCountByBlockNumber> ethGetUncleCountByBlockNumber(
            DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetCode> ethGetCode(
            String address, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthSign> ethSign(String address, String sha3HashOfDataToSign); @Override Request<?, org.web3j.protocol.core.methods.response.EthSendTransaction> ethSendTransaction(
            Transaction transaction); @Override Request<?, org.web3j.protocol.core.methods.response.EthSendTransaction> ethSendRawTransaction(
            String signedTransactionData); @Override Request<?, org.web3j.protocol.core.methods.response.EthCall> ethCall(
            Transaction transaction, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthEstimateGas> ethEstimateGas(Transaction transaction); @Override Request<?, EthBlock> ethGetBlockByHash(
            String blockHash, boolean returnFullTransactionObjects); @Override Request<?, EthBlock> ethGetBlockByNumber(
            DefaultBlockParameter defaultBlockParameter,
            boolean returnFullTransactionObjects); @Override Request<?, EthTransaction> ethGetTransactionByHash(String transactionHash); @Override Request<?, EthTransaction> ethGetTransactionByBlockHashAndIndex(
            String blockHash, BigInteger transactionIndex); @Override Request<?, EthTransaction> ethGetTransactionByBlockNumberAndIndex(
            DefaultBlockParameter defaultBlockParameter, BigInteger transactionIndex); @Override Request<?, EthGetTransactionReceipt> ethGetTransactionReceipt(String transactionHash); @Override Request<?, EthBlock> ethGetUncleByBlockHashAndIndex(
            String blockHash, BigInteger transactionIndex); @Override Request<?, EthBlock> ethGetUncleByBlockNumberAndIndex(
            DefaultBlockParameter defaultBlockParameter, BigInteger uncleIndex); @Override Request<?, EthGetCompilers> ethGetCompilers(); @Override Request<?, EthCompileLLL> ethCompileLLL(String sourceCode); @Override Request<?, EthCompileSolidity> ethCompileSolidity(String sourceCode); @Override Request<?, EthCompileSerpent> ethCompileSerpent(String sourceCode); @Override Request<?, EthFilter> ethNewFilter(
            org.web3j.protocol.core.methods.request.EthFilter ethFilter); @Override Request<?, EthFilter> ethNewBlockFilter(); @Override Request<?, EthFilter> ethNewPendingTransactionFilter(); @Override Request<?, EthUninstallFilter> ethUninstallFilter(BigInteger filterId); @Override Request<?, EthLog> ethGetFilterChanges(BigInteger filterId); @Override Request<?, EthLog> ethGetFilterLogs(BigInteger filterId); @Override Request<?, EthLog> ethGetLogs(
            org.web3j.protocol.core.methods.request.EthFilter ethFilter); @Override Request<?, EthGetWork> ethGetWork(); @Override Request<?, EthSubmitWork> ethSubmitWork(
            String nonce, String headerPowHash, String mixDigest); @Override Request<?, EthSubmitHashrate> ethSubmitHashrate(String hashrate, String clientId); @Override Request<?, DbPutString> dbPutString(
            String databaseName, String keyName, String stringToStore); @Override Request<?, DbGetString> dbGetString(String databaseName, String keyName); @Override Request<?, DbPutHex> dbPutHex(String databaseName, String keyName, String dataToStore); @Override Request<?, DbGetHex> dbGetHex(String databaseName, String keyName); @Override Request<?, org.web3j.protocol.core.methods.response.ShhPost> shhPost(ShhPost shhPost); @Override Request<?, ShhVersion> shhVersion(); @Override Request<?, ShhNewIdentity> shhNewIdentity(); @Override Request<?, ShhHasIdentity> shhHasIdentity(String identityAddress); @Override Request<?, ShhNewGroup> shhNewGroup(); @Override Request<?, ShhAddToGroup> shhAddToGroup(String identityAddress); @Override Request<?, ShhNewFilter> shhNewFilter(ShhFilter shhFilter); @Override Request<?, ShhUninstallFilter> shhUninstallFilter(BigInteger filterId); @Override Request<?, ShhMessages> shhGetFilterChanges(BigInteger filterId); @Override Request<?, ShhMessages> shhGetMessages(BigInteger filterId); @Override Observable<String> ethBlockHashObservable(); @Override Observable<String> ethPendingTransactionHashObservable(); @Override Observable<Log> ethLogObservable(
            org.web3j.protocol.core.methods.request.EthFilter ethFilter); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> transactionObservable(); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> pendingTransactionObservable(); @Override Observable<EthBlock> blockObservable(boolean fullTransactionObjects); @Override Observable<EthBlock> replayBlocksObservable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock,
            boolean fullTransactionObjects); @Override Observable<EthBlock> replayBlocksObservable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock,
            boolean fullTransactionObjects, boolean ascending); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> replayTransactionsObservable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock); @Override Observable<EthBlock> catchUpToLatestBlockObservable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects,
            Observable<EthBlock> onCompleteObservable); @Override Observable<EthBlock> catchUpToLatestBlockObservable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> catchUpToLatestTransactionObservable(DefaultBlockParameter startBlock); @Override Observable<EthBlock> catchUpToLatestAndSubscribeToNewBlocksObservable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> catchUpToLatestAndSubscribeToNewTransactionsObservable(
            DefaultBlockParameter startBlock); @Override void shutdown(); }
JsonRpc2_0Web3j implements Web3j { @Override public void shutdown() { scheduledExecutorService.shutdown(); } JsonRpc2_0Web3j(Web3jService web3jService);  JsonRpc2_0Web3j(
            Web3jService web3jService, long pollingInterval,
            ScheduledExecutorService scheduledExecutorService); @Override Request<?, EthAccounts> debugGetModifiedAccountsByNumber(int start, int end); @Override Request<?, TxPoolContent> txPoolContent(); @Override Request<?, Web3ClientVersion> web3ClientVersion(); @Override Request<?, Web3Sha3> web3Sha3(String data); @Override Request<?, NetVersion> netVersion(); @Override Request<?, NetListening> netListening(); @Override Request<?, NetPeerCount> netPeerCount(); @Override Request<?, EthProtocolVersion> ethProtocolVersion(); @Override Request<?, EthCoinbase> ethCoinbase(); @Override Request<?, EthSyncing> ethSyncing(); @Override Request<?, EthMining> ethMining(); @Override Request<?, EthHashrate> ethHashrate(); @Override Request<?, EthGasPrice> ethGasPrice(); @Override Request<?, EthAccounts> ethAccounts(); @Override Request<?, EthBlockNumber> ethBlockNumber(); @Override Request<?, EthGetBalance> ethGetBalance(
            String address, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetStorageAt> ethGetStorageAt(
            String address, BigInteger position, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetTransactionCount> ethGetTransactionCount(
            String address, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetBlockTransactionCountByHash> ethGetBlockTransactionCountByHash(
            String blockHash); @Override Request<?, EthGetBlockTransactionCountByNumber> ethGetBlockTransactionCountByNumber(
            DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetUncleCountByBlockHash> ethGetUncleCountByBlockHash(String blockHash); @Override Request<?, EthGetUncleCountByBlockNumber> ethGetUncleCountByBlockNumber(
            DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthGetCode> ethGetCode(
            String address, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthSign> ethSign(String address, String sha3HashOfDataToSign); @Override Request<?, org.web3j.protocol.core.methods.response.EthSendTransaction> ethSendTransaction(
            Transaction transaction); @Override Request<?, org.web3j.protocol.core.methods.response.EthSendTransaction> ethSendRawTransaction(
            String signedTransactionData); @Override Request<?, org.web3j.protocol.core.methods.response.EthCall> ethCall(
            Transaction transaction, DefaultBlockParameter defaultBlockParameter); @Override Request<?, EthEstimateGas> ethEstimateGas(Transaction transaction); @Override Request<?, EthBlock> ethGetBlockByHash(
            String blockHash, boolean returnFullTransactionObjects); @Override Request<?, EthBlock> ethGetBlockByNumber(
            DefaultBlockParameter defaultBlockParameter,
            boolean returnFullTransactionObjects); @Override Request<?, EthTransaction> ethGetTransactionByHash(String transactionHash); @Override Request<?, EthTransaction> ethGetTransactionByBlockHashAndIndex(
            String blockHash, BigInteger transactionIndex); @Override Request<?, EthTransaction> ethGetTransactionByBlockNumberAndIndex(
            DefaultBlockParameter defaultBlockParameter, BigInteger transactionIndex); @Override Request<?, EthGetTransactionReceipt> ethGetTransactionReceipt(String transactionHash); @Override Request<?, EthBlock> ethGetUncleByBlockHashAndIndex(
            String blockHash, BigInteger transactionIndex); @Override Request<?, EthBlock> ethGetUncleByBlockNumberAndIndex(
            DefaultBlockParameter defaultBlockParameter, BigInteger uncleIndex); @Override Request<?, EthGetCompilers> ethGetCompilers(); @Override Request<?, EthCompileLLL> ethCompileLLL(String sourceCode); @Override Request<?, EthCompileSolidity> ethCompileSolidity(String sourceCode); @Override Request<?, EthCompileSerpent> ethCompileSerpent(String sourceCode); @Override Request<?, EthFilter> ethNewFilter(
            org.web3j.protocol.core.methods.request.EthFilter ethFilter); @Override Request<?, EthFilter> ethNewBlockFilter(); @Override Request<?, EthFilter> ethNewPendingTransactionFilter(); @Override Request<?, EthUninstallFilter> ethUninstallFilter(BigInteger filterId); @Override Request<?, EthLog> ethGetFilterChanges(BigInteger filterId); @Override Request<?, EthLog> ethGetFilterLogs(BigInteger filterId); @Override Request<?, EthLog> ethGetLogs(
            org.web3j.protocol.core.methods.request.EthFilter ethFilter); @Override Request<?, EthGetWork> ethGetWork(); @Override Request<?, EthSubmitWork> ethSubmitWork(
            String nonce, String headerPowHash, String mixDigest); @Override Request<?, EthSubmitHashrate> ethSubmitHashrate(String hashrate, String clientId); @Override Request<?, DbPutString> dbPutString(
            String databaseName, String keyName, String stringToStore); @Override Request<?, DbGetString> dbGetString(String databaseName, String keyName); @Override Request<?, DbPutHex> dbPutHex(String databaseName, String keyName, String dataToStore); @Override Request<?, DbGetHex> dbGetHex(String databaseName, String keyName); @Override Request<?, org.web3j.protocol.core.methods.response.ShhPost> shhPost(ShhPost shhPost); @Override Request<?, ShhVersion> shhVersion(); @Override Request<?, ShhNewIdentity> shhNewIdentity(); @Override Request<?, ShhHasIdentity> shhHasIdentity(String identityAddress); @Override Request<?, ShhNewGroup> shhNewGroup(); @Override Request<?, ShhAddToGroup> shhAddToGroup(String identityAddress); @Override Request<?, ShhNewFilter> shhNewFilter(ShhFilter shhFilter); @Override Request<?, ShhUninstallFilter> shhUninstallFilter(BigInteger filterId); @Override Request<?, ShhMessages> shhGetFilterChanges(BigInteger filterId); @Override Request<?, ShhMessages> shhGetMessages(BigInteger filterId); @Override Observable<String> ethBlockHashObservable(); @Override Observable<String> ethPendingTransactionHashObservable(); @Override Observable<Log> ethLogObservable(
            org.web3j.protocol.core.methods.request.EthFilter ethFilter); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> transactionObservable(); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> pendingTransactionObservable(); @Override Observable<EthBlock> blockObservable(boolean fullTransactionObjects); @Override Observable<EthBlock> replayBlocksObservable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock,
            boolean fullTransactionObjects); @Override Observable<EthBlock> replayBlocksObservable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock,
            boolean fullTransactionObjects, boolean ascending); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> replayTransactionsObservable(
            DefaultBlockParameter startBlock, DefaultBlockParameter endBlock); @Override Observable<EthBlock> catchUpToLatestBlockObservable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects,
            Observable<EthBlock> onCompleteObservable); @Override Observable<EthBlock> catchUpToLatestBlockObservable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> catchUpToLatestTransactionObservable(DefaultBlockParameter startBlock); @Override Observable<EthBlock> catchUpToLatestAndSubscribeToNewBlocksObservable(
            DefaultBlockParameter startBlock, boolean fullTransactionObjects); @Override Observable<org.web3j.protocol.core.methods.response.Transaction> catchUpToLatestAndSubscribeToNewTransactionsObservable(
            DefaultBlockParameter startBlock); @Override void shutdown(); static final int DEFAULT_BLOCK_TIME; }