Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.net
Class ConfigurableLocalAddressProvider

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractSet
          extended by com.tangosol.net.ConfigurableAddressProvider
              extended by com.tangosol.net.ConfigurableLocalAddressProvider

All Implemented Interfaces:
AddressProvider, DescribableAddressProvider, SocketAddressProvider, java.lang.Iterable, java.util.Collection, java.util.Set

public class ConfigurableLocalAddressProvider
extends ConfigurableAddressProvider

ConfiguableLocalAddressProvider is an AddressProvider which is only capable of return local addresses.

As is it known that only local addresses can be returned this provider supports some formats not supportable by the ConfigurableAddressProvider. Namely empty and null hostnames are assumed to be equal to "localhost". Additionally the hostname string may be in CIDR format i.e. 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_listHolders

 

Constructor Summary
ConfigurableLocalAddressProvider(XmlElement xmlConfig)
          Construct an instance of ConfigurableLocalAddressProvider based on the specified XML element.
ConfigurableLocalAddressProvider(XmlElement xmlConfig, boolean fSafe)
          Construct an instance of ConfigurableLocalAddressProvider based on the specified XML element.

 

Method Summary
protected  java.net.InetSocketAddress resolveAddress(java.lang.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, toString

 

Methods inherited from class java.util.AbstractSet
removeAll

 

Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray

 

Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray

 

Constructor Detail

ConfigurableLocalAddressProvider

public ConfigurableLocalAddressProvider(XmlElement xmlConfig)
Construct an instance of ConfigurableLocalAddressProvider based on the specified XML element.

Unresolveable addresses will be skipped.

Parameters:
xmlConfig - the XML element that contains the configuration info

ConfigurableLocalAddressProvider

public ConfigurableLocalAddressProvider(XmlElement xmlConfig,
                                        boolean fSafe)
Construct an instance of ConfigurableLocalAddressProvider based on the specified XML element.
Parameters:
xmlConfig - the XML element that contains the configuration info
fSafe - true if the provider is skips unresolved addresses

Method Detail

resolveAddress

protected java.net.InetSocketAddress resolveAddress(java.lang.String sHost,
                                                    int nPort)
Resolve an address and port.
Overrides:
resolveAddress in class ConfigurableAddressProvider
Parameters:
sHost - the host
nPort - the port
Returns:
the InetSocketAddress

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.