Package io.hekate.network.address
Interface AddressSelector
-
- All Known Implementing Classes:
AddressPattern
public interface AddressSelector
Network host address selector.Implementation of this interface is used by
NetworkService
to resolve which of its local IP addresses should be advertised to remote nodes so that they could connect to the local node. The resolved address becomes a part of theClusterNode.address()
.Implementations of this interface can be registered via
NetworkServiceFactory.setHostSelector(AddressSelector)
.Default implementation of this interface is the
AddressPattern
class. It provides support for configurable pattern-based filtering of the network interfaces during address resolution. Please see its documentation for more details about its capabilities and configuration options.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InetAddress
select()
Resolves the IP address for the local node.
-
-
-
Method Detail
-
select
InetAddress select() throws HekateException
Resolves the IP address for the local node. The returned address will be used by remote nodes to connect to the local node.- Returns:
- Local node address.
- Throws:
HekateException
- If address resolution fails.
-
-