- java.lang.Object
-
- org.eclipse.jetty.util.InetAddressPattern
-
- All Implemented Interfaces:
java.util.function.Predicate<java.net.InetAddress>
public abstract class InetAddressPattern extends java.lang.Object implements java.util.function.Predicate<java.net.InetAddress>
A pattern representing a single or range ofInetAddress
. To create a pattern use thefrom(String)
method, which will create a pattern given a string conforming to one of the following formats.- InetAddress
- A single InetAddress either in hostname or address format.
All formats supported by
InetAddress
are accepted. Not ethat using hostname matches may force domain lookups. eg. "[::1]", "1.2.3.4", "::ffff:127.0.0.1" - InetAddress/CIDR
- An InetAddress with a integer number of bits to indicate the significant prefix. eg. "192.168.0.0/16" will match from "192.168.0.0" to "192.168.255.255"
- InetAddress-InetAddress
- An inclusive range of InetAddresses. eg. "[a000::1]-[afff::]", "192.168.128.0-192.168.128.255"
- Legacy format
- The legacy format used for IPv4 only. eg. "10.10.10-14.0-128"
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_pattern
-
Constructor Summary
Constructors Constructor Description InetAddressPattern(java.lang.String pattern)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InetAddressPattern
from(java.lang.String pattern)
java.lang.String
toString()
-
-
-
Method Detail
-
from
public static InetAddressPattern from(java.lang.String pattern)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-