AtomicInteger expectedResponseCount = (AtomicInteger) getContextValue(res.request(), transactionIdentity.get() + RESPONSE_COUNTER);
ResponseMessage m = null;
if (expectedResponseCount != null && res.resource().transport() != AtmosphereResource.TRANSPORT.WEBSOCKET) {
m = (ResponseMessage) getContextValue(res.request(), transactionIdentity.get() + ResponseMessage.class.getName());
if (m != null) {
m.response(builder.build());
} else {
m = new ResponseMessage(identity, builder.build());
}
if (expectedResponseCount.decrementAndGet() <= 0) {