ru.qatools.gridrouter.config.WithRoute Maven / Gradle / Ivy
package ru.qatools.gridrouter.config;
import org.apache.commons.codec.digest.DigestUtils;
import java.nio.charset.StandardCharsets;
/**
* @author Dmitry Baev [email protected]
* @author Innokenty Shuvalov [email protected]
*/
public interface WithRoute {
default String getAddress() {
return getName() + ":" + getPort();
}
default String getRoute() {
return "http://" + getAddress();
}
default String getRouteId() {
return DigestUtils.md5Hex(getRoute().getBytes(StandardCharsets.UTF_8));
}
String getName();
int getPort();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy