public class MachineList
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
MachineList.InetAddressFactory |
InetAddressFactory is used to obtain InetAddress from host.
|
| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
|
static java.lang.String |
WILDCARD_VALUE |
| Constructor | Description |
|---|---|
MachineList(java.lang.String hostEntries) |
|
MachineList(java.lang.String hostEntries,
MachineList.InetAddressFactory addressFactory) |
|
MachineList(java.util.Collection<java.lang.String> hostEntries) |
|
MachineList(java.util.Collection<java.lang.String> hostEntries,
MachineList.InetAddressFactory addressFactory) |
Accepts a collection of ip/cidr/host addresses
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Collection<java.lang.String> |
getCollection() |
returns the contents of the MachineList as a Collection<String> .
|
boolean |
includes(java.lang.String ipAddress) |
Accepts an ip address and return true if ipAddress is in the list.
|
boolean |
includes(java.net.InetAddress address) |
Accepts an inet address and return true if address is in the list.
|
public static final org.slf4j.Logger LOG
public static final java.lang.String WILDCARD_VALUE
public MachineList(java.lang.String hostEntries)
hostEntries - comma separated ip/cidr/host addressespublic MachineList(java.lang.String hostEntries,
MachineList.InetAddressFactory addressFactory)
public MachineList(java.util.Collection<java.lang.String> hostEntries)
hostEntries - collection of separated ip/cidr/host addressespublic MachineList(java.util.Collection<java.lang.String> hostEntries,
MachineList.InetAddressFactory addressFactory)
hostEntries - hostEntries.addressFactory - addressFactory to convert host to InetAddresspublic boolean includes(java.lang.String ipAddress)
includes(InetAddress) should be preferred
to avoid possibly re-resolving the ip address.ipAddress - ipAddress.public boolean includes(java.net.InetAddress address)
address - address.@VisibleForTesting public java.util.Collection<java.lang.String> getCollection()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.