code: @Override
      protected void doHandle(CommandContext ctx) throws CommandLineException {
          final ModelControllerClient client = ctx.getModelControllerClient();
          if(client == null) {
              throw new CommandLineException("Connection is not available.");
          }
  
          if (embeddedServerRef != null && embeddedServerRef.get() != null) {
              doHandleEmbedded(ctx, client);
              return;
          }
  
          if (!(client instanceof AwaiterModelControllerClient)) {
              throw new CommandLineException("Unsupported ModelControllerClient implementation " + client.getClass().getName());
          }
          final AwaiterModelControllerClient cliClient = (AwaiterModelControllerClient) client;
  
          final ModelNode op = this.buildRequestWithoutHeaders(ctx);
          try {
              final ModelNode response = cliClient.execute(op, true);
              if(!Util.isSuccess(response)) {
                  throw new CommandLineException(Util.getFailureDescription(response));
              }
          } catch(IOException e) {
              // if it's not connected it's assumed the reload is in process
              if (cliClient.isConnected()) {
                  StreamUtils.safeClose(client);
                  throw new CommandLineException("Failed to execute :reload", e);
              }
          }
  
          ensureServerRebootComplete(ctx, client);
      }
docs: /* (non-Javadoc)
  @see org.jboss.as.cli.handlers.CommandHandlerWithHelp#doHandle(org.jboss.as.cli.CommandContext)