[jboss-as7-dev] JBAS-9151 requires an api change to InterfaceCriteria
Scott Stark
sstark at redhat.com
Sun Mar 27 19:05:41 EDT 2011
So digging into this more, the issue cannot be resolved without an api
change because there are interface criteria that aggregate other
criteria. For example, the
NetworkServiceInterface.OverallInterfaceCriteria, NotInterfaceCriteria,
AnyInterfaceCriteria, etc. The current issue I have is that the
LoopbackInterfaceCriteriaWithAddress is wrapped in a
NetworkServiceInterface.OverallInterfaceCriteria instance, and therefore
I cannot determine that it provides a InterfaceCriteriaWithAddress
implementation. The proper change would require a change to the
InterfaceCriteria to return the bindAddress to use when the criteria is
accepted, with the default implementation simply returning the input
address:
public interface InterfaceCriteria extends Serializable {
/**
* Gets whether the given network interface and address are
acceptable for
* use. Acceptance is indicated by returning the address which
should be used for binding against
* the network interface, typically this is the input address. For
those criteria which override the
* bind address, the overriden address should be returned.
*
* @param networkInterface the network interface. Cannot be
<code>null</code>
* @param address an address that is associated with
<code>networkInterface</code>. Cannot be <code>null</code>
* @return <code>InetAddress</code> the non-null address to bind to
if the criteria is met, null if the criteria does not apply
*
* @throws SocketException
*/
InetAddress isAcceptable(NetworkInterface networkInterface,
InetAddress address) throws SocketException;
}
More information about the jboss-as7-dev
mailing list