public class InetAddressMatchInterfaceCriteria extends Object implements InterfaceCriteria
InterfaceCriteria
that tests whether a given address is matches
the specified address.Constructor and Description |
---|
InetAddressMatchInterfaceCriteria(org.jboss.dmr.ModelNode address)
Creates a new InetAddressMatchInterfaceCriteria
|
InetAddressMatchInterfaceCriteria(String address)
Creates a new InetAddressMatchInterfaceCriteria
|
Modifier and Type | Method and Description |
---|---|
InetAddress |
getAddress() |
InetAddress |
isAcceptable(NetworkInterface networkInterface,
InetAddress address)
Gets whether the given network interface and address are acceptable for
use.
|
String |
toString() |
public InetAddressMatchInterfaceCriteria(org.jboss.dmr.ModelNode address)
address
- a valid value to pass to InetAddress.getByName(String)
Cannot be null
IllegalArgumentException
- if network
is null
public InetAddressMatchInterfaceCriteria(String address)
address
- a valid String value to pass to InetAddress.getByName(String)
Cannot be null
IllegalArgumentException
- if network
is null
public InetAddress getAddress() throws UnknownHostException
UnknownHostException
public 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 interface InterfaceCriteria
networkInterface
- the network interface. Cannot be null
address
- an address that is associated with networkInterface
.
Cannot be null
getAddress()
if the address
is the same as the one returned by getAddress()
.SocketException
- if evaluating the state of networkInterface
results in oneCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.