We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5b09db commit 8ddf307Copy full SHA for 8ddf307
config/src/main/java/ru/qatools/gridrouter/config/WithRoute.java
@@ -10,17 +10,19 @@
10
*/
11
public interface WithRoute {
12
13
- int getPort();
14
-
15
- String getName();
16
17
- int getCount();
+ default String getAddress() {
+ return getName() + ":" + getPort();
+ }
18
19
default String getRoute() {
20
- return String.format("http://%s:%d", getName(), getPort());
+ return "http://" + getAddress();
21
}
22
23
default String getRouteId() {
24
return DigestUtils.md5Hex(getRoute().getBytes(StandardCharsets.UTF_8));
25
+
+ String getName();
26
27
+ int getPort();
28
0 commit comments