public class NetMatcher extends Object
Constructor and Description |
---|
NetMatcher(Collection<String> nets,
DNSService dnsServer)
Create a new instance of Netmatcher.
|
NetMatcher(String[] nets,
DNSService dnsServer)
Create a new instance of Netmatcher.
|
Modifier and Type | Method and Description |
---|---|
protected void |
log(String s)
Can be overwritten for logging
|
boolean |
matchInetNetwork(InetAddress ip)
Return true if passed InetAddress match a network which was used to
construct the Netmatcher.
|
boolean |
matchInetNetwork(String hostIP)
The given String may represent an IP address or a host name.
|
String |
toString()
Return a sorted representation of the inet networks.
|
public NetMatcher(String[] nets, DNSService dnsServer)
nets
- a String[] which holds all networksdnsServer
- the DNSService which will be used in this classpublic NetMatcher(Collection<String> nets, DNSService dnsServer)
nets
- a Collection which holds all networksdnsServer
- the DNSService which will be used in this classpublic boolean matchInetNetwork(String hostIP)
hostIP
- the ipAddress or host name to checkmatchInetNetwork(InetAddress)
public boolean matchInetNetwork(InetAddress ip)
ip
- InetAddresspublic String toString()
protected void log(String s)
s
- the String to logCopyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.