@Override public Object getAccountDetails(String accountID) { System.out.println(" getAccountDetails - Starts "); btcClient = (BitcoinClient) btcClientMap.get(serverID); BitcoinDetails bitcoinDetails = new BitcoinDetails(); bitcoinDetails.setAccount(accountID); bitcoinDetails.setServerID(serverID); System.out.println(" getLabel - " + bitcoinDetails.getLabel()); btcClient.getServerInfo(); bitcoinDetails.setAddress(btcClient.getAccountAddress(accountID)); bitcoinDetails.setName(btcClient.getLabel(bitcoinDetails.getAddress())); bitcoinDetails.setBalance(String.valueOf(btcClient.getBalance())); bitcoinDetails.setCurrentBlockNumber(btcClient.getBlockNumber()); bitcoinDetails.setSentboxData(getSentBoxData(accountID)); bitcoinDetails.setReceivedboxData(getReceivedBoxData(accountID)); bitcoinDetails.setReceivedAddrboxData(getRecevingAddrBoxData(accountID)); System.out.println( "Block Count:" + btcClient.getBlockCount() + " btcClient.getBlockNumber():" + btcClient.getBlockNumber()); return bitcoinDetails; }
public String getBlockNumber() { btcClient = (BitcoinClient) btcClientMap.get(serverID); return String.valueOf(btcClient.getBlockNumber()); }