public class SocketAddress extends ObjectWithJsonToString
| Modifier and Type | Class and Description |
|---|---|
static class |
SocketAddress.Scheme |
| Constructor and Description |
|---|
SocketAddress() |
| Modifier and Type | Method and Description |
|---|---|
String |
getHost() |
Integer |
getPort() |
SocketAddress.Scheme |
getScheme() |
static SocketAddress |
socketAddress()
Static builder to create a socketAddress.
|
SocketAddress |
withHost(String host)
The host or ip address to use when connecting to the socket to i.e.
|
SocketAddress |
withPort(Integer port)
The port to use when connecting to the socket i.e.
|
SocketAddress |
withScheme(SocketAddress.Scheme scheme)
The scheme to use when connecting to the socket, either HTTP or HTTPS.
|
toStringequals, fieldsExcludedFromEqualsAndHashCode, hashCodepublic static SocketAddress socketAddress()
public String getHost()
public SocketAddress withHost(String host)
host - a hostname or ip address as a stringpublic Integer getPort()
public SocketAddress withPort(Integer port)
port - a port as an integerpublic SocketAddress.Scheme getScheme()
public SocketAddress withScheme(SocketAddress.Scheme scheme)
scheme - the scheme as a SocketAddress.Scheme valueCopyright © 2020. All rights reserved.