protected Object processObjResponse(Message msg, String opName) throws Exception {
    Part part = msg.getPart(0);
    final MessageType msgType = msg.getMessageType();
    if (msgType == MessageType.RESPONSE) {
      return part.getObject();
    } else {
      if (msgType == MessageType.EXCEPTION) {
        String s = "While performing a remote " + opName;
        throw new ServerOperationException(s, (Throwable) part.getObject());
        // Get the exception toString part.
        // This was added for c++ thin client and not used in java
      } else if (isErrorResponse(msgType)) {
        throw new ServerOperationException(part.getString());
      } else {
        throw new InternalGemFireError("Unexpected message type " + msgType);
      }
    }
  }
Process a response that contains a single Object result.

@param msg the message containing the response
@param opName text describing this op
@return the result of the response
@throws Exception if response could not be processed or we received a response with a server
        exception.
geode-core/src/main/java/org/apache/geode/cache/client/internal/AbstractOp.java