forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend common container locator to return a POJO
- Loading branch information
Patryk Najda
committed
Jun 26, 2021
1 parent
f22562c
commit 24563b4
Showing
2 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...ions/devservices/common/src/main/java/io/quarkus/devservices/common/ContainerAddress.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package io.quarkus.devservices.common; | ||
|
||
public class ContainerAddress { | ||
private final String ipAddress; | ||
private final int port; | ||
|
||
public ContainerAddress(String ipAddress, Integer port) { | ||
this.ipAddress = ipAddress; | ||
this.port = port; | ||
} | ||
|
||
public String getIpAddress() { | ||
return ipAddress; | ||
} | ||
|
||
public int getPort() { | ||
return port; | ||
} | ||
|
||
public String getUrl() { | ||
return String.format("%s:%d", ipAddress, port); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters