public class NotInterfaceCriteria extends Object implements InterfaceCriteria
InterfaceCriteria
that tests whether a given network interface and
address satisfy none of a contained set of InterfaceCriteria
.Constructor and Description |
---|
NotInterfaceCriteria(Set<InterfaceCriteria> criteria)
Creates a new NotInterfaceCriteria
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Map<NetworkInterface,Set<InetAddress>> |
getAcceptableAddresses(Map<NetworkInterface,Set<InetAddress>> candidates)
Gets which of the available network interfaces and addresses are acceptable for
use.
|
int |
hashCode() |
public NotInterfaceCriteria(Set<InterfaceCriteria> criteria)
criteria
- the criteria to check to see if none are satisfied.
Cannot be null
IllegalArgumentException
- if criteria
is null
public Map<NetworkInterface,Set<InetAddress>> getAcceptableAddresses(Map<NetworkInterface,Set<InetAddress>> candidates) throws SocketException
InterfaceCriteria
LoopbackAddressInterfaceCriteria
, the override
address should be returned in the set associated with the relevant interface.getAcceptableAddresses
in interface InterfaceCriteria
candidates
- map of candidate interfaces and addresses. This map may include all known interfaces and
addresses or the system, or a subset of them that were acceptable to other criteria.null
; an
empty map should be returned if no acceptable items are found. The set of addresses stored as
values in the map should not be null
or empty; no key for an interface should be stored
if no addresses are acceptable. A criteria that only cares about the network interface should
return a map including all provided candidate addresses for that interface.SocketException
Copyright © 2023 JBoss by Red Hat. All rights reserved.