private int getIterations(Await params) { if (params.getIterations() != null) { return params.getIterations(); } else { return DEFAULT_POLL_ITERATIONS; } }
private int getIterations(Await params) { if (params.getIterations() != null) { return params.getIterations(); } else { return DEFAULT_POLL_ITERATIONS; } }
public StaticAwaitStrategy(Cube<?> cube, Await params) { super(params.getSleepPollingTime()); this.ip = params.getIp(); this.ports.addAll(params.getPorts()); if (params.getIterations() != null) { this.pollIterations = params.getIterations(); } }
public StaticAwaitStrategy(Cube<?> cube, Await params) { super(params.getSleepPollingTime()); this.ip = params.getIp(); this.ports.addAll(params.getPorts()); if (params.getIterations() != null) { this.pollIterations = params.getIterations(); } }
public PollingAwaitStrategy(Cube<?> cube, DockerClientExecutor dockerClientExecutor, Await params) { super(params.getSleepPollingTime()); this.cube = cube; this.dockerClientExecutor = dockerClientExecutor; if (params.getIterations() != null) { this.pollIterations = params.getIterations(); } if (params.getType() != null) { this.type = params.getType(); } if (params.getPorts() != null && params.getPorts().size() > 0) { this.ports = params.getPorts(); } }
public PollingAwaitStrategy(Cube<?> cube, DockerClientExecutor dockerClientExecutor, Await params) { super(params.getSleepPollingTime()); this.cube = cube; this.dockerClientExecutor = dockerClientExecutor; if (params.getIterations() != null) { this.pollIterations = params.getIterations(); } if (params.getType() != null) { this.type = params.getType(); } if (params.getPorts() != null && params.getPorts().size() > 0) { this.ports = params.getPorts(); } }
public HttpAwaitStrategy(Cube<?> cube, DockerClientExecutor dockerClientExecutor, Await params) { super(params.getSleepPollingTime()); this.cube = cube; this.dockerClientExecutor = dockerClientExecutor; if (params.getIterations() != null) { this.pollIterations = params.getIterations(); } if (params.getUrl() != null) { String url = params.getUrl(); if (url.contains(DOCKER_HOST)) { url = url.replaceAll(DOCKER_HOST, dockerClientExecutor.getDockerServerIp()); } try { this.url = new URL(url); } catch (IOException e) { throw new IllegalArgumentException(e); } } else { throw new IllegalArgumentException("Http Await Strategy requires url field"); } if (params.getResponseCode() != null) { this.responseCode = params.getResponseCode(); } if (params.getHeaders() != null) { this.headers = params.getHeaders(); } if (params.getMatch() != null) { this.matcher = params.getMatch(); } }
public HttpAwaitStrategy(Cube<?> cube, DockerClientExecutor dockerClientExecutor, Await params) { super(params.getSleepPollingTime()); this.cube = cube; this.dockerClientExecutor = dockerClientExecutor; if (params.getIterations() != null) { this.pollIterations = params.getIterations(); } if (params.getUrl() != null) { String url = params.getUrl(); if (url.contains(DOCKER_HOST)) { url = url.replaceAll(DOCKER_HOST, dockerClientExecutor.getDockerServerIp()); } try { this.url = new URL(url); } catch (IOException e) { throw new IllegalArgumentException(e); } } else { throw new IllegalArgumentException("Http Await Strategy requires url field"); } if (params.getResponseCode() != null) { this.responseCode = params.getResponseCode(); } if (params.getHeaders() != null) { this.headers = params.getHeaders(); } if (params.getMatch() != null) { this.matcher = params.getMatch(); } }