Class NicInterfaceCriteria
- java.lang.Object
-
- org.jboss.as.controller.interfaces.AbstractInterfaceCriteria
-
- org.jboss.as.controller.interfaces.NicInterfaceCriteria
-
- All Implemented Interfaces:
Serializable
,Comparable<InterfaceCriteria>
,InterfaceCriteria
public class NicInterfaceCriteria extends AbstractInterfaceCriteria
InterfaceCriteria
that tests whether a given name matches the network interface'sname
.- Author:
- Brian Stansberry
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NicInterfaceCriteria(String name)
Creates a new AnyInterfaceCriteria
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getAcceptableName()
int
hashCode()
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
-
-
-
-
Constructor Detail
-
NicInterfaceCriteria
public NicInterfaceCriteria(String name)
Creates a new AnyInterfaceCriteria- Parameters:
name
- the criteria to check to see if any are satisfied. Cannot benull
- Throws:
IllegalArgumentException
- ifcriteria
isnull
-
-
Method Detail
-
getAcceptableName
public String getAcceptableName()
-
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
if theacceptable name
equalsnetworkInterface
'sname
.- Throws:
SocketException
- if evaluating the state ofnetworkInterface
results in one
-
-