private IntObjectOpenHashMap<AsyncCallback<MarketDataBarEvent>> requestIdBarCallbackMap;
private AtomicInteger latestRequestId;
public IbDataProducer() {
latestRequestId = new AtomicInteger(0);
ibSocket = new EClientSocket(this);
ibSocket.eConnect("127.0.0.1", 7496, 1);
requestIdContractMap = new IntObjectOpenHashMap<Contract>();
requestIdBarCallbackMap = new IntObjectOpenHashMap<AsyncCallback<MarketDataBarEvent>>();
}