Package org.opensaml.profile.logic
Class IPRangePredicate
- java.lang.Object
-
- org.opensaml.profile.logic.IPRangePredicate
-
- All Implemented Interfaces:
Predicate<BaseContext>,Predicate<BaseContext>
public class IPRangePredicate extends Object implements Predicate<BaseContext>
-
-
Field Summary
Fields Modifier and Type Field Description private Collection<IPRange>addressRangesIP ranges to match against.private Supplier<javax.servlet.http.HttpServletRequest>httpRequestSupplierServlet request to evaluate.
-
Constructor Summary
Constructors Constructor Description IPRangePredicate()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidsetHttpServletRequest(javax.servlet.http.HttpServletRequest request)Deprecated, for removal: This API element is subject to removal in a future version.voidsetHttpServletRequestSupplier(Supplier<javax.servlet.http.HttpServletRequest> supplier)Set the Supplier for the servlet request to evaluate.voidsetRanges(Collection<IPRange> ranges)Set the address ranges to check against.booleantest(BaseContext input)
-
-
-
Field Detail
-
httpRequestSupplier
@Nullable private Supplier<javax.servlet.http.HttpServletRequest> httpRequestSupplier
Servlet request to evaluate.
-
addressRanges
@Nonnull @NonnullElements private Collection<IPRange> addressRanges
IP ranges to match against.
-
-
Method Detail
-
setRanges
public void setRanges(@Nonnull @NonnullElements Collection<IPRange> ranges)
Set the address ranges to check against.- Parameters:
ranges- address ranges to check against- Since:
- 3.3.0
-
setHttpServletRequestSupplier
public void setHttpServletRequestSupplier(@Nonnull Supplier<javax.servlet.http.HttpServletRequest> supplier)Set the Supplier for the servlet request to evaluate.- Parameters:
supplier- servlet request supplier to use
-
setHttpServletRequest
@Deprecated(since="4.3", forRemoval=true) public void setHttpServletRequest(@Nonnull javax.servlet.http.HttpServletRequest request)
Deprecated, for removal: This API element is subject to removal in a future version.Set the servlet request to evaluate.- Parameters:
request- servlet request to evaluate
-
test
public boolean test(@Nullable BaseContext input)- Specified by:
testin interfacePredicate<BaseContext>
-
-