Class PublicAddressInterfaceCriteria
- java.lang.Object
-
- org.jboss.as.controller.interfaces.AbstractInterfaceCriteria
-
- org.jboss.as.controller.interfaces.PublicAddressInterfaceCriteria
-
- All Implemented Interfaces:
Serializable
,Comparable<InterfaceCriteria>
,InterfaceCriteria
public class PublicAddressInterfaceCriteria extends AbstractInterfaceCriteria
InterfaceCriteria
that tests whether a given address is notsite-local
,link-local
or awildcard address
.- Author:
- Brian Stansberry
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static PublicAddressInterfaceCriteria
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InetAddress
isAcceptable(NetworkInterface networkInterface, InetAddress address)
Gets whether the given network interface and address are acceptable for use.-
Methods inherited from class org.jboss.as.controller.interfaces.AbstractInterfaceCriteria
cloneCandidates, compareTo, getAcceptableAddresses
-
-
-
-
Field Detail
-
INSTANCE
public static final PublicAddressInterfaceCriteria INSTANCE
-
-
Method Detail
-
isAcceptable
protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException
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 givenaddress
parameter. For those criteria which override the configured address, the override address should be returned.- Specified by:
isAcceptable
in classAbstractInterfaceCriteria
- Parameters:
networkInterface
- the network interface. Cannot benull
address
- an address that is associated withnetworkInterface
. Cannot benull
- Returns:
address
ifaddress
is notsite-local
,link-local
or awildcard address
.- Throws:
SocketException
- if evaluating the state ofnetworkInterface
results in one
-
-