private boolean connectUsingRemoting(
      CommandContext cmdCtx, RemotingMBeanServerConnection rmtMBeanSvrConn)
      throws IOException, CliInitializationException {
    Connection conn = rmtMBeanSvrConn.getConnection();
    Channel channel;
    final IoFuture<Channel> futureChannel = conn.openChannel("management", OptionMap.EMPTY);
    IoFuture.Status result = futureChannel.await(5, TimeUnit.SECONDS);
    if (result == IoFuture.Status.DONE) {
      channel = futureChannel.get();
    } else {
      return false;
    }

    ModelControllerClient modelCtlrClient =
        ExistingChannelModelControllerClient.createReceiving(channel, createExecutor());
    cmdCtx.bindClient(modelCtlrClient);

    return true;
  }