}
// Depending on the operation type, call the appropriate handler.
logger.debug("Handling a {} response: {}, pubSubData: {}, host: {}.",
va(pubSubData.operationType, response, pubSubData, ctx.getChannel()));
AbstractResponseHandler respHandler = handlers.get(pubSubData.operationType);
if (null == respHandler) {
// The above are the only expected PubSubResponse messages received
// from the server for the various client side requests made.
logger.error("Response received from server is for an unhandled operation {}, txnId: {}.",
va(pubSubData.operationType, response.getTxnId()));
pubSubData.getCallback().operationFailed(pubSubData.context,
new UnexpectedConditionException("Can't find response handler for operation "
+ pubSubData.operationType));
return;
}
respHandler.handleResponse(response, pubSubData, ctx.getChannel());
}