Package io.vertx.reactivex.core.net
Class SocketAddress
- java.lang.Object
-
- io.vertx.reactivex.core.net.SocketAddress
-
public class SocketAddress extends Object
The address of a socket, an inet socket address or a domain socket address. UseinetSocketAddress(int, java.lang.String)
to create an inet socket address anddomainSocketAddress(java.lang.String)
to create a domain socket address NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<SocketAddress>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description SocketAddress(SocketAddress delegate)
SocketAddress(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SocketAddress
domainSocketAddress(String path)
Create a domain socket address from apath
.boolean
equals(Object o)
SocketAddress
getDelegate()
int
hashCode()
String
host()
Returns the host name when available or the IP address in string representation.String
hostAddress()
Returns the host IP address when available ornull
as a String.String
hostName()
Returns the host name when available ornull
Domain socket address returnsnull
.static SocketAddress
inetSocketAddress(int port, String host)
Create an inet socket address,host
must be nonnull
andport
must be between0
and65536
.static SocketAddress
inetSocketAddress(InetSocketAddress address)
Create a inet socket address from a Java .boolean
isDomainSocket()
boolean
isInetSocket()
static SocketAddress
newInstance(SocketAddress arg)
String
path()
int
port()
static SocketAddress
sharedRandomPort(int id, String host)
Create an inet socket address that binds to a shared random port identified byid
.String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<SocketAddress> __TYPE_ARG
-
-
Constructor Detail
-
SocketAddress
public SocketAddress(SocketAddress delegate)
-
SocketAddress
public SocketAddress(Object delegate)
-
-
Method Detail
-
getDelegate
public SocketAddress getDelegate()
-
sharedRandomPort
public static SocketAddress sharedRandomPort(int id, String host)
Create an inet socket address that binds to a shared random port identified byid
.
Thehost
string can be a host name or a host address.
No name resolution will be attempted.- Parameters:
id
- the shared random port idhost
- the host- Returns:
- the created socket address
-
inetSocketAddress
public static SocketAddress inetSocketAddress(int port, String host)
Create an inet socket address,host
must be nonnull
andport
must be between0
and65536
.
Thehost
string can be a host name or a host address.
No name resolution will be attempted.- Parameters:
port
- the porthost
- the host- Returns:
- the created socket address
-
domainSocketAddress
public static SocketAddress domainSocketAddress(String path)
Create a domain socket address from apath
.- Parameters:
path
- the address path- Returns:
- the created socket address
-
host
public String host()
Returns the host name when available or the IP address in string representation.
Domain socket address returnsnull
.- Returns:
- the host address
-
hostName
public String hostName()
Returns the host name when available ornull
Domain socket address returnsnull
.- Returns:
- the host name
-
hostAddress
public String hostAddress()
Returns the host IP address when available ornull
as a String.
Domain socket address returnsnull
.- Returns:
- the host address
-
port
public int port()
- Returns:
- the address port or
-1
for a domain socket
-
path
public String path()
- Returns:
- the domain socket path or
null
for inet socket address, empty path represents unnamed domain socket addresses.
-
isInetSocket
public boolean isInetSocket()
- Returns:
true
for an inet socket address
-
isDomainSocket
public boolean isDomainSocket()
- Returns:
true
for an domain socket address
-
inetSocketAddress
public static SocketAddress inetSocketAddress(InetSocketAddress address)
Create a inet socket address from a Java .
No name resolution will be attempted.- Parameters:
address
- the address- Returns:
- the created socket address
-
newInstance
public static SocketAddress newInstance(SocketAddress arg)
-
-