@Override
  public Object execute(ParseResult parseResult) {
    Method method = parseResult.getMethod();

    // check if it's a shell only command
    if (isShellOnly(method)) {
      Assert.notNull(parseResult, "Parse result required");
      synchronized (mutex) {
        Assert.isTrue(isReadyForCommands(), "Not yet ready for commands");

        Object exeuctionResult = new CommandExecutor(null).execute((GfshParseResult) parseResult);
        if (exeuctionResult instanceof ResultModel) {
          return new CommandResult((ResultModel) exeuctionResult);
        }
        return exeuctionResult;

      }
    }

    // check if it's a GfshParseResult
    if (!(parseResult instanceof GfshParseResult)) {
      throw new IllegalStateException("Configuration error!");
    }

    ResultModel resultModel = executeOnRemote((GfshParseResult) parseResult);

    if (resultModel == null) {
      return null;
    }
    return new CommandResult(resultModel);
  }
Executes the method indicated by the {@link ParseResult} which would always be
{@link GfshParseResult} for GemFire defined commands. If the command Method is decorated with
{@link CliMetaData#shellOnly()} set to <code>false</code>, {@link OperationInvoker} is used to
send the command for processing on a remote GemFire node.

@param parseResult that should be executed (never presented as null)
@return an object which will be rendered by the {@link Shell} implementation (may return null)
        this returns a CommandResult for all the online commands. For offline-commands,
        this can return either a CommandResult or ExitShellRequest
@throws RuntimeException which is handled by the {@link Shell} implementation
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/shell/GfshExecutionStrategy.java