Search in sources :

Example 1 with HttpPingChecker

use of io.fabric8.maven.docker.wait.HttpPingChecker in project docker-maven-plugin by fabric8io.

the class WaitService method getUrlWaitChecker.

// =================================================================================================================
private WaitChecker getUrlWaitChecker(String imageConfigDesc, Properties projectProperties, WaitConfiguration wait) {
    String waitUrl = StrSubstitutor.replace(wait.getUrl(), projectProperties);
    WaitConfiguration.HttpConfiguration httpConfig = wait.getHttp();
    HttpPingChecker checker;
    if (httpConfig != null) {
        checker = new HttpPingChecker(waitUrl, httpConfig.getMethod(), httpConfig.getStatus(), httpConfig.isAllowAllHosts());
        log.info("%s: Waiting on url %s with method %s for status %s.", imageConfigDesc, waitUrl, httpConfig.getMethod(), httpConfig.getStatus());
    } else {
        checker = new HttpPingChecker(waitUrl);
        log.info("%s: Waiting on url %s.", imageConfigDesc, waitUrl);
    }
    return checker;
}
Also used : HttpPingChecker(io.fabric8.maven.docker.wait.HttpPingChecker) WaitConfiguration(io.fabric8.maven.docker.config.WaitConfiguration)

Aggregations

WaitConfiguration (io.fabric8.maven.docker.config.WaitConfiguration)1 HttpPingChecker (io.fabric8.maven.docker.wait.HttpPingChecker)1