public static void main(String[] args) throws Exception { logger.debug("Started executing BidAskDownloaderPocJob"); if (worker == null) { logger.error("Worker object is null exiting."); return; } worker.login(); for (String s : args) { Thread t = new BidAskDownloaderWorkerThread(s.trim()); t.start(); } }
public void run() { logger.debug("Executing BidAskDownloaderPocJob for scrip-" + scrip); while (true) { String dom = ""; try { dom = worker.getBidAskListDom(scrip); ShareKhanBidAskLists skBaList = ShareKhanParserUtil.getBidAskLists(dom); skBaList.setScrip(scrip); printBidAskListToConsole(skBaList); Thread.sleep(10000); } catch (Exception e) { logger.error(e); e.printStackTrace(); throw new RuntimeException(e); } } // logger.debug("FINISHED Executing BidAskDownloaderPocJob for scrip-"+scrip); }
static { worker = ShareKhanWorker.getInstance(); }