Package io.smallrye.stork.utils
Class StorkAddressUtils
java.lang.Object
io.smallrye.stork.utils.StorkAddressUtils
A set of utility methods around addresses.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HostAndPortparseToHostAndPort(String address, int defaultPort, String configPlace) Creates a newHostAndPortinstance from an address.static StringparseToString(HostAndPort hostAndPort)
-
Field Details
-
HTTP_PREFIX
- See Also:
-
HTTPS_PREFIX
- See Also:
-
-
Constructor Details
-
StorkAddressUtils
public StorkAddressUtils()
-
-
Method Details
-
parseToHostAndPort
Creates a newHostAndPortinstance from an address.- Parameters:
address- the address, eitherhost:portor justhostdefaultPort- the default port, used when the address doesn't provide the portconfigPlace- the location of the address in the configuration, for logging purposes- Returns:
- the new HostAndPort
-
parseToString
- Parameters:
hostAndPort-HostAndPortinstance from an address.- Returns:
- the String containing either
host:portor justhost
-