public class LoopbackAddressInterfaceCriteria extends AbstractInterfaceCriteria
Constructor and Description |
---|
LoopbackAddressInterfaceCriteria(InetAddress address)
Creates a new LoopbackAddressInterfaceCriteria
|
LoopbackAddressInterfaceCriteria(String address)
Creates a new LoopbackAddressInterfaceCriteria
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
InetAddress |
getAddress() |
int |
hashCode() |
protected InetAddress |
isAcceptable(NetworkInterface networkInterface,
InetAddress address)
Gets whether the given network interface and address are acceptable for
use.
|
String |
toString() |
cloneCandidates, getAcceptableAddresses
public LoopbackAddressInterfaceCriteria(InetAddress address)
address
- a valid value to pass to InetAddress.getByName(String)
Cannot be null
IllegalArgumentException
- if network
is null
public LoopbackAddressInterfaceCriteria(String address)
address
- a valid value to pass to InetAddress.getByName(String)
Cannot be null
IllegalArgumentException
- if network
is null
public InetAddress getAddress() throws UnknownHostException
UnknownHostException
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
getAddress()
()
if NetworkInterface.isLoopback()
is true, null otherwise.SocketException
- if evaluating the state of networkInterface
results in oneCopyright © 2023 JBoss by Red Hat. All rights reserved.