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

ru.qatools.gridrouter.config.WithRoute Maven / Gradle / Ivy

There is a newer version: 1.31
Show newest version
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