synchronized (requestIdContractMap) {
c = requestIdContractMap.get(requestId);
}
MarketDataBarEvent barEvent = new MarketDataBarEvent();
barEvent.setContract(c);
Date dateTime = new Date(Long.parseLong(formattedDate));
barEvent.setDateTime(dateTime);
barEvent.setOpenPrice(openPrice);
barEvent.setHighPrice(highPrice);
barEvent.setLowPrice(lowPrice);
barEvent.setClosePrice(closePrice);
barEvent.setVolume(volume);
barEvent.setVwap(weightedAverage);
barEvent.setHasGaps(hasGaps);
AsyncCallback<MarketDataBarEvent> cb = null;
synchronized (requestIdBarCallbackMap) {
cb = requestIdBarCallbackMap.get(requestId);