public class SubnetMatchInterfaceCriteria extends AbstractInterfaceCriteria
InterfaceCriteria that tests whether a given address is on the
desired subnet.| Constructor and Description |
|---|
SubnetMatchInterfaceCriteria(byte[] network,
int mask)
Creates a new SubnetMatchInterfaceCriteria
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
protected InetAddress |
isAcceptable(NetworkInterface networkInterface,
InetAddress address)
Gets whether the given network interface and address are acceptable for
use.
|
cloneCandidates, getAcceptableAddressespublic SubnetMatchInterfaceCriteria(byte[] network,
int mask)
network - an InetAddress in byte[] form.
Cannot be nullmask - the number of bits in network that represent
the networkIllegalArgumentException - if network is nullprotected 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 AbstractInterfaceCriterianetworkInterface - the network interface. Cannot be nulladdress - an address that is associated with networkInterface.
Cannot be nulladdress if the address is on the correct subnet.SocketException - if evaluating the state of networkInterface results in oneCopyright © 2017 JBoss by Red Hat. All rights reserved.