public void cancel() { if (threadForSliceCollector != null && isCancelled == false) { threadForSliceCollector.interrupt(); ExchangeController.getIbExchangeInstance().cancelMarketData(requestHolder); isCancelled = true; } }
public RequestMarketSymbolData( RequestHolder requestHolder, RequestMarketSymbolDataListener requestMarketDataListener, MarketSymbolData marketSymbolData, int sliceMilliseconds) { this.requestHolder = requestHolder; this.requestHolder.caller = this; this.requestMarketSymbolDataListener = requestMarketDataListener; this.marketSymbolData = marketSymbolData; this.exResultSetMarketSymbolData = new ExResultMarketSymbolData().new ExResultSetMarketSymbolData(marketSymbolData); this.sliceMilliseconds = sliceMilliseconds; ExchangeController.getIbExchangeInstance() .getMarketDataForSymbol(marketSymbolData.exchange, marketSymbolData.symbol, requestHolder); }