Package com.tangosol.net
Class ConfigurableLocalAddressProvider
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
com.tangosol.net.ConfigurableAddressProvider
com.tangosol.net.ConfigurableLocalAddressProvider
- All Implemented Interfaces:
 AddressProvider,DescribableAddressProvider,SocketAddressProvider,Iterable,Collection,Set
ConfigurableLocalAddressProvider is an AddressProvider which is only
 capable of returning local addresses.
 
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.
- Since:
 - Coherence 3.7.1
 - Author:
 - mf 2011.06.13
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class com.tangosol.net.ConfigurableAddressProvider
ConfigurableAddressProvider.AddressHolder - 
Field Summary
Fields inherited from class com.tangosol.net.ConfigurableAddressProvider
m_fResolve, m_fSafe, m_iLast, m_iterAddr, m_listHolders - 
Constructor Summary
ConstructorsConstructorDescriptionConfigurableLocalAddressProvider(int nPort) Constructs a ConfigurableLocalAddressProvider for all local IPs and the given port.ConfigurableLocalAddressProvider(XmlElement xmlConfig) Deprecated.ConfigurableLocalAddressProvider(XmlElement xmlConfig, boolean fSafe) Deprecated.ConfigurableLocalAddressProvider(Iterable<ConfigurableAddressProvider.AddressHolder> addressHolders, boolean fSafe) Constructs a ConfigurableLocalAddressProvider using the specifiedConfigurableAddressProvider.AddressHolders. - 
Method Summary
Modifier and TypeMethodDescriptionstatic AddressProviderBuilderbuilder(int nPort) Return a builder which will produce Providers for all local addresses and the specified portprotected Iterator<InetSocketAddress> resolveAddress(String sHost, int nPort) Resolve an address and port.Methods inherited from class com.tangosol.net.ConfigurableAddressProvider
accept, configure, equals, getAddressDescriptions, getNextAddress, hashCode, iterator, makeProvider, reject, reset, reset, size, sortHolders, toStringMethods inherited from class java.util.AbstractSet
removeAllMethods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray 
- 
Constructor Details
- 
ConfigurableLocalAddressProvider
Deprecated.Construct an instance of ConfigurableLocalAddressProvider based on the specified XML element.Unresolvable addresses will be skipped.
- Parameters:
 xmlConfig- the XML element that contains the configuration info
 - 
ConfigurableLocalAddressProvider
public ConfigurableLocalAddressProvider(Iterable<ConfigurableAddressProvider.AddressHolder> addressHolders, boolean fSafe) Constructs a ConfigurableLocalAddressProvider using the specifiedConfigurableAddressProvider.AddressHolders.- Parameters:
 addressHolders- theConfigurableAddressProvider.AddressHoldersfSafe- true if the provider skips unresolved addresses
 - 
ConfigurableLocalAddressProvider
public ConfigurableLocalAddressProvider(int nPort) Constructs a ConfigurableLocalAddressProvider for all local IPs and the given port. - 
ConfigurableLocalAddressProvider
Deprecated.Construct an instance of ConfigurableLocalAddressProvider based on the specified XML element.- Parameters:
 xmlConfig- the XML element that contains the configuration infofSafe- true if the provider is skips unresolved addresses
 
 - 
 - 
Method Details
- 
resolveAddress
Resolve an address and port.- Overrides:
 resolveAddressin classConfigurableAddressProvider- Parameters:
 sHost- the hostnPort- the port- Returns:
 - the InetSocketAddress
 
 - 
builder
Return a builder which will produce Providers for all local addresses and the specified port- Parameters:
 nPort- the port- Returns:
 - the builder
 
 
 -