Package org.apache.juneau.http.remote
Class RemoteUrlPolicy.AllowedRanges
java.lang.Object
org.apache.juneau.http.remote.RemoteUrlPolicy.AllowedRanges
- Enclosing class:
- RemoteUrlPolicy
A validated, parsed per-client allow-list of special-purpose address ranges, the per-client counterpart of the
"RestClient.allowAddressRanges" system property.
It has exactly the property's narrow semantics: every entry must lie entirely inside IllegalArgumentException), entries are parsed as literals without any DNS lookup, and the ranges never
re-permit loopback, link-local/metadata, private, CGNAT or any other denied address. Instances are immutable;
two instances holding the same set of ranges are equal.
- Since:
- 10.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RemoteUrlPolicy.AllowedRangesThe empty allow-list, which re-permits nothing. -
Method Summary
-
Field Details
-
NONE
The empty allow-list, which re-permits nothing.
-
-
Method Details
-
of
Parses and validates allow-list entries.- Parameters:
specs- The entries; each element may itself hold several comma- or whitespace-separated CIDR ranges or single addresses.null or empty yieldsNONE.- Returns:
- The parsed allow-list. Never
null . - Throws:
IllegalArgumentException- If any entry is malformed or not entirely inside one of the five special-purpose ranges.
-
isEmpty
Returnstrue if this allow-list re-permits nothing.- Returns:
true if empty.
-
equals
-
hashCode
-
toString
-