All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.brachu.johann.ContainerPort Maven / Gradle / Ivy

package io.brachu.johann;

public class ContainerPort {

    private final String host;
    private final String port;

    public ContainerPort(String host, PortBinding binding) {
        this.host = host;
        port = binding.getPort();
    }

    public String getHost() {
        return host;
    }

    public int getPort() {
        return Integer.parseInt(port);
    }

    public String format(String template) {
        return template
                .replace("$HOST", host)
                .replace("$PORT", port);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy