public class ConfigurableLocalAddressProvider extends ConfigurableAddressProvider
As is it known that only local addresses can be returned, this provider supports some formats not supported by the ConfigurableAddressProvider, namely empty and null hostnames are assumed to be equal to "localhost". Additionally, the hostname string may be in CIDR format (e.g. subnet/mask) allowing the provider to choose a matching local address.
ConfigurableAddressProvider.AddressHolderm_fResolve, m_fSafe, m_iLast, m_iterAddr, m_listHolders| Constructor and Description |
|---|
ConfigurableLocalAddressProvider(int nPort)
Constructs a ConfigurableLocalAddressProvider for all local IPs and the given port.
|
ConfigurableLocalAddressProvider(Iterable<ConfigurableAddressProvider.AddressHolder> addressHolders, boolean fSafe)
Constructs a ConfigurableLocalAddressProvider using the specified
ConfigurableAddressProvider.AddressHolders. |
ConfigurableLocalAddressProvider(XmlElement xmlConfig)
Deprecated.
|
ConfigurableLocalAddressProvider(XmlElement xmlConfig, boolean fSafe)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static AddressProviderBuilder |
builder(int nPort)
Return a builder which will produce Providers for all local addresses and the specified port
|
protected Iterator<InetSocketAddress> |
resolveAddress(String sHost, int nPort)
Resolve an address and port.
|
accept, configure, equals, getAddressDescriptions, getNextAddress, hashCode, iterator, makeProvider, reject, reset, reset, size, sortHolders, toStringremoveAlladd, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, stream@Deprecated public ConfigurableLocalAddressProvider(XmlElement xmlConfig)
Unresolvable addresses will be skipped.
xmlConfig - the XML element that contains the configuration infopublic ConfigurableLocalAddressProvider(Iterable<ConfigurableAddressProvider.AddressHolder> addressHolders, boolean fSafe)
ConfigurableAddressProvider.AddressHolders.addressHolders - the ConfigurableAddressProvider.AddressHoldersfSafe - true if the provider skips unresolved addressespublic ConfigurableLocalAddressProvider(int nPort)
@Deprecated public ConfigurableLocalAddressProvider(XmlElement xmlConfig, boolean fSafe)
xmlConfig - the XML element that contains the configuration infofSafe - true if the provider is skips unresolved addressesprotected Iterator<InetSocketAddress> resolveAddress(String sHost, int nPort)
resolveAddress in class ConfigurableAddressProvidersHost - the hostnPort - the portpublic static AddressProviderBuilder builder(int nPort)