if (requestType == RequestType.NOP_REQUEST) {
return;
}
ClusterResponse clusterResponse = null;
if (requestType == RequestType.CLUSTER_REQUEST) {
clusterResponse = clusterHandler.processRequest(ois, clientProtocol);
//Check for immediate failure
final Throwable failure = clusterResponse.getFailure();
if (null != clusterResponse && null != failure) {
clusterHandler.getLogger().debug("Failed to write to ClusterResponse", failure);
try {
info.setOutputStream(new CountingOutputStream(rawOut));
oos = new ObjectOutputStream(info.getOutputStream());
clusterResponse.setMetaData(clientProtocol);
clusterResponse.writeExternal(oos);
oos.flush();
} catch (final IOException ie) {
final String m = "Failed to write to ClusterResponse: " + ie.getMessage();
clusterHandler.getLogger().error(m, ie);
throw Exceptions.newIOException(m, ie);