java.lang.Object
com.github.markusbernhardt.proxy.selector.whitelist.IpRangeFilter
- All Implemented Interfaces:
UriFilter
Filters an URI by inspecting it's IP address is in a given range. The range
as must be defined in CIDR notation. e.g. 192.0.2.1/24,
- Author:
- Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
IpRangeFilter
public IpRangeFilter(String matchTo)
Constructor
- Parameters:
matchTo - the match subnet in CIDR notation.
-
Method Details
-
accept
public boolean accept(URI uri)
accept
- Specified by:
accept in interface UriFilter
- Parameters:
uri - the URI to test.
- Returns:
- true if it matches the criteria else false.
- See Also:
-