public class NicInterfaceCriteria extends AbstractInterfaceCriteria
InterfaceCriteria
that tests whether a given name matches the
network interface's name
.Constructor and Description |
---|
NicInterfaceCriteria(String name)
Creates a new AnyInterfaceCriteria
|
Modifier and Type | Method and 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.
|
cloneCandidates, getAcceptableAddresses
public NicInterfaceCriteria(String name)
name
- the criteria to check to see if any are satisfied.
Cannot be null
IllegalArgumentException
- if criteria
is null
public String getAcceptableName()
protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException
address
parameter. For those criteria which override the configured address, the override address should
be returned.isAcceptable
in class AbstractInterfaceCriteria
networkInterface
- the network interface. Cannot be null
address
- an address that is associated with networkInterface
.
Cannot be null
address
if the acceptable name
equals networkInterface
's name
.SocketException
- if evaluating the state of networkInterface
results in oneCopyright © 2023 JBoss by Red Hat. All rights reserved.