Package io.atomix.utils.net
Class Address
java.lang.Object
io.atomix.utils.net.Address
Representation of a network address.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the IP address.address(boolean resolve) Returns the IP address.booleanstatic Addressfrom(int port) Returns an address for the local host and the given port.static AddressReturns the address from the given host:port string.static AddressReturns an address for the given host/port.inthashCode()host()Returns the host name.static Addresslocal()Returns an address that binds to all interfaces.intport()Returns the port.toString()type()Returns the address type.
-
Constructor Details
-
Address
-
Address
-
-
Method Details
-
local
Returns an address that binds to all interfaces.- Returns:
- the address
-
from
Returns the address from the given host:port string.- Parameters:
address- the address string- Returns:
- the address
-
from
Returns an address for the given host/port.- Parameters:
host- the host nameport- the port- Returns:
- a new address
-
from
Returns an address for the local host and the given port.- Parameters:
port- the port- Returns:
- a new address
-
host
Returns the host name.- Returns:
- the host name
-
port
public int port()Returns the port.- Returns:
- the port
-
address
Returns the IP address.- Returns:
- the IP address
-
address
Returns the IP address.- Parameters:
resolve- whether to force resolve the hostname- Returns:
- the IP address
-
socketAddress
-
type
Returns the address type.- Returns:
- the address type
-
hashCode
public int hashCode() -
equals
-
toString
-