* @return the correlation identifier, not null
*/
@SuppressWarnings("deprecation")
protected CorrelationID submitBloombergAuthorizationRequest(Request request, UserHandle userHandle) {
getLogger().debug("Sending Request={}", request);
CorrelationID cid = new CorrelationID(generateCorrelationID());
synchronized (cid) {
_correlationIDMap.put(cid, cid);
try {
getSession().sendAuthorizationRequest(request, userHandle, cid);
} catch (Exception ex) {
_correlationIDMap.remove(cid);
throw new OpenGammaRuntimeException("Unable to send request " + request, ex);
}
try {
cid.wait();
} catch (InterruptedException ex) {
Thread.interrupted();
throw new OpenGammaRuntimeException("Unable to process request " + request, ex);
}
}