|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.anotheria.net.util.PlainIPFilter
public class PlainIPFilter
This is a helper class which determines whether an ip adress is in specified range. Used for cms access control among others.
| Constructor Summary | |
|---|---|
PlainIPFilter()
Creates a new filter. |
|
| Method Summary | |
|---|---|
void |
addRange(String ipAdress,
int mask)
Adds an ip (allowed)range to the filter. |
static void |
main(String[] a)
|
boolean |
mayPass(String ipAddress)
Returns true if the parameter ip-adress is in one of the configured ranges. |
static boolean |
mayPass(String ipAddress,
List<IPRange> ranges)
Returns true if the parameter ip-adress is in one of the ranges. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PlainIPFilter()
| Method Detail |
|---|
public void addRange(String ipAdress,
int mask)
ipAdress - an adress.mask - a network (byte)mask.
public static boolean mayPass(String ipAddress,
List<IPRange> ranges)
ipAdress - the adress to check.ranges - to pass through
public boolean mayPass(String ipAddress)
ipAdress - the adress to check.
public String toString()
toString in class Objectpublic static void main(String[] a)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||