void (DaemonStopClient stopClient, ServiceRegistry daemonServices) { DaemonRegistry daemonRegistry = daemonServices.get(DaemonRegistry.class); List<DaemonConnectDetails> daemonInfos = new ArrayList<>(daemonRegistry.getAll()); stopClient.gracefulStop(daemonInfos); }