public final class IpAddressMatcher extends Object implements RequestMatcher
Both IPv6 and IPv4 addresses are supported, but a matcher which is configured with an IPv4 address will never match a request which returns an IPv6 address, and vice-versa.
| 构造器和说明 |
|---|
IpAddressMatcher(String ipAddress)
Takes a specific IP address or a range specified using the
IP/Netmask (e.g. 192.168.1.0/24 or 202.24.0.0/14).
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
matches(javax.servlet.http.HttpServletRequest request)
Decides whether the rule implemented by the strategy matches the supplied request.
|
boolean |
matches(String address) |
public IpAddressMatcher(String ipAddress)
ipAddress - the address or range of addresses from which the request must come.public boolean matches(javax.servlet.http.HttpServletRequest request)
RequestMatchermatches 在接口中 RequestMatcherrequest - the request to check for a matchpublic boolean matches(String address)
Copyright © 2016. All rights reserved.