|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.api.dnsservice.util.NetMatcher
public class NetMatcher
Class which can be used to check if an ipAddress match a network
| Constructor Summary | |
|---|---|
NetMatcher(java.util.Collection nets,
DNSService dnsServer)
Create a new instance of Netmatcher |
|
NetMatcher(java.lang.String[] nets,
DNSService dnsServer)
Create a new instance of Netmatcher |
|
| Method Summary | |
|---|---|
void |
initInetNetworks(java.util.Collection nets)
Init the class with the given networks |
void |
initInetNetworks(java.lang.String[] nets)
Init the class with the given networks |
protected void |
log(java.lang.String s)
Can be overwritten for loggin |
boolean |
matchInetNetwork(java.net.InetAddress ip)
|
boolean |
matchInetNetwork(java.lang.String hostIP)
Return true if passed host match a network which was used to init the Netmatcher |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NetMatcher(java.lang.String[] nets,
DNSService dnsServer)
nets - a String[] which holds all networksdnsServer - the DNSService which will be used in this class
public NetMatcher(java.util.Collection nets,
DNSService dnsServer)
nets - a Collection which holds all networksdnsServer - the DNSService which will be used in this class| Method Detail |
|---|
public void initInetNetworks(java.util.Collection nets)
nets - a Collection which holds all networkspublic void initInetNetworks(java.lang.String[] nets)
nets - a String[] which holds all networkspublic boolean matchInetNetwork(java.lang.String hostIP)
hostIP - the ipAddress or hostname to check
public boolean matchInetNetwork(java.net.InetAddress ip)
matchInetNetwork(String)public java.lang.String toString()
toString in class java.lang.ObjectInetNetwork#toString()protected void log(java.lang.String s)
s - the String to log
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||