private void handleDockerSwarmResponse(final PullResponseItem item) { if (results == null) { results = new HashMap<>(); } // Swarm terminates a pull sometimes with an empty line. // Therefore keep first success message PullResponseItem currentItem = results.get(item.getId()); if (currentItem == null || !currentItem.isPullSuccessIndicated()) { results.put(item.getId(), item); } }
private void checkDockerSwarmPullSuccessful() { if (results.isEmpty()) { throw new DockerClientException("Could not pull image through Docker Swarm"); } else { boolean pullFailed = false; StringBuilder sb = new StringBuilder(); for (PullResponseItem pullResponseItem : results.values()) { if (!pullResponseItem.isPullSuccessIndicated()) { pullFailed = true; sb.append("[" + pullResponseItem.getId() + ":" + messageFromPullResult(pullResponseItem) + "]"); } } if (pullFailed) { throw new DockerClientException("Could not pull image: " + sb.toString()); } } }
private void checkDockerClientPullSuccessful() { if (latestItem == null) { throw new DockerClientException("Could not pull image"); } else if (!latestItem.isPullSuccessIndicated()) { throw new DockerClientException("Could not pull image: " + messageFromPullResult(latestItem)); } }
private void handleDockerSwarmResponse(final PullResponseItem item) { if (results == null) { results = new HashMap<>(); } // Swarm terminates a pull sometimes with an empty line. // Therefore keep first success message PullResponseItem currentItem = results.get(item.getId()); if (currentItem == null || !currentItem.isPullSuccessIndicated()) { results.put(item.getId(), item); } }
private void checkDockerSwarmPullSuccessful() { if (results.isEmpty()) { throw new DockerClientException("Could not pull image through Docker Swarm"); } else { boolean pullFailed = false; StringBuilder sb = new StringBuilder(); for (PullResponseItem pullResponseItem : results.values()) { if (!pullResponseItem.isPullSuccessIndicated()) { pullFailed = true; sb.append("[" + pullResponseItem.getId() + ":" + messageFromPullResult(pullResponseItem) + "]"); } } if (pullFailed) { throw new DockerClientException("Could not pull image: " + sb.toString()); } } }
private void checkDockerClientPullSuccessful() { if (latestItem == null) { throw new DockerClientException("Could not pull image"); } else if (!latestItem.isPullSuccessIndicated()) { throw new DockerClientException("Could not pull image: " + messageFromPullResult(latestItem)); } }