|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.jigsaw.auth.IPMatcher
public class IPMatcher
A fast way of associating IP adresses to any Object. This IPMatcher classes maps IP adresses to objects. It understands wild cards, encoded as ((short) 256). Wild card will match any adress below it.
Constructor Summary | |
---|---|
IPMatcher()
|
Method Summary | |
---|---|
void |
add(short[] a,
java.lang.Object closure)
Associate the given IP adress to the given object. |
java.lang.Object |
lookup(byte[] a)
Lookup the adress for an association. |
java.lang.Object |
lookup(java.net.InetAddress inetadr)
Lookup the given InetAdress for any association. |
void |
print(java.io.PrintStream out)
Print the IP matcher internal tree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IPMatcher()
Method Detail |
---|
public void add(short[] a, java.lang.Object closure)
a
- The adress to use as a key for the association.closure
- The associated object.public java.lang.Object lookup(byte[] a)
a
- The adress to look for.
public java.lang.Object lookup(java.net.InetAddress inetadr)
inetadr
- The inet adress to look for.
public void print(java.io.PrintStream out)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |