org.springframework.security.web.util
Class IpAddressMatcher

java.lang.Object
  extended by org.springframework.security.web.util.IpAddressMatcher
All Implemented Interfaces:
RequestMatcher

public class IpAddressMatcher
extends Object
implements RequestMatcher

Matches a request based on IP Address or subnet mask matching against the remote address.

Since:
3.0.2
Author:
Luke Taylor

Constructor Summary
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).
 
Method Summary
 boolean matches(HttpServletRequest request)
          Decides whether the rule implemented by the strategy matches the supplied request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IpAddressMatcher

public 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).

Parameters:
ipAddress - the address or range of addresses from which the request must come.
Method Detail

matches

public boolean matches(HttpServletRequest request)
Description copied from interface: RequestMatcher
Decides whether the rule implemented by the strategy matches the supplied request.

Specified by:
matches in interface RequestMatcher
Parameters:
request - the request to check for a match
Returns:
true if the request matches, false otherwise


Copyright © 2004-2011 SpringSource, Inc. All Rights Reserved.