コード例 #1
0
 public void cancel() {
   if (threadForSliceCollector != null && isCancelled == false) {
     threadForSliceCollector.interrupt();
     ExchangeController.getIbExchangeInstance().cancelMarketData(requestHolder);
     isCancelled = true;
   }
 }
コード例 #2
0
  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);
  }