throw new CommandLineException("Connection is now available.");
}
if(!(client instanceof CLIModelControllerClient)) {
throw new CommandLineException("Unsupported ModelControllerClient implementation " + client.getClass().getName());
}
final CLIModelControllerClient cliClient = (CLIModelControllerClient) client;
final ModelNode op = this.buildRequestWithoutHeaders(ctx);
final ModelNode response;
try {
response = cliClient.execute(op, true);
} catch(IOException e) {
ctx.disconnectController();
throw new CommandLineException("Failed to execute :shutdown", e);
}