public class NetworkHostAndPort
Tuple of host and port. Use NetworkHostAndPort.parse on untrusted data.
NetworkHostAndPort.parsepublic static net.corda.core.utilities.NetworkHostAndPort.Companion Companion
public NetworkHostAndPort(@NotNull
java.lang.String host,
int port)
Tuple of host and port. Use NetworkHostAndPort.parse on untrusted data.
host - a hostname or IP address. IPv6 addresses must not be enclosed in square brackets.port - a valid port number.NetworkHostAndPort.parse@NotNull public java.lang.String toString()
@NotNull public java.lang.String getHost()
a hostname or IP address.
IPv6 addresses must not be enclosed in square brackets.
public int getPort()
a valid port number.
@NotNull public java.lang.String component1()
a hostname or IP address.
IPv6 addresses must not be enclosed in square brackets.
public int component2()
a valid port number.
@NotNull public NetworkHostAndPort copy(@NotNull java.lang.String host, int port)
Tuple of host and port. Use NetworkHostAndPort.parse on untrusted data.
host - a hostname or IP address. IPv6 addresses must not be enclosed in square brackets.port - a valid port number.NetworkHostAndPort.parsepublic int hashCode()
Tuple of host and port. Use NetworkHostAndPort.parse on untrusted data.
NetworkHostAndPort.parsepublic boolean equals(@Nullable
java.lang.Object p)
Tuple of host and port. Use NetworkHostAndPort.parse on untrusted data.
NetworkHostAndPort.parse@JvmStatic @NotNull public static NetworkHostAndPort parse(@NotNull java.lang.String str)
Parses a string of the form host:port into a class NetworkHostAndPort.
The host part may be a hostname or IP address. If it's an IPv6 address, it must be enclosed in square brackets.
Note this does not parse the toString of a resolved java.net.InetSocketAddress, which is of a host/IP:port form.
IllegalArgumentException - if the port is missing, the string is garbage, or the NetworkHostAndPort constructor rejected the parsed parts.class NetworkHostAndPort,
java.net.InetSocketAddress