|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.util.IPChecker
public class IPChecker
IPChecker allows to check IP Addresses with respect to the allow/deny patterns specified in the configuration. Works with IPV4 and IPV6 adress formats.
| Constructor Summary | |
|---|---|
IPChecker(String allowPattern,
String denyPattern)
|
|
| Method Summary | |
|---|---|
boolean |
accessAllowed(InetAddress inetAddress)
Checks if the specified InetAdress has permission to access. |
boolean |
accessAllowed(Socket socket)
Checks if a (connection from a) socket has permission to access. |
boolean |
accessAllowed(String hostName)
Checks if the host with the specified name has the permission to access. |
static IPChecker |
getConfiguredIPChecker()
Returns an IPChecker which is initialized with the patterns from the configuration |
static void |
init()
initializes the ip-checker; |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IPChecker(String allowPattern,
String denyPattern)
| Method Detail |
|---|
public static IPChecker getConfiguredIPChecker()
public static void init()
public boolean accessAllowed(String hostName)
hostName - the name or string IP representation.
public boolean accessAllowed(Socket socket)
socket - the Socket to check access for.
public boolean accessAllowed(InetAddress inetAddress)
inetAddress - the InetAdress to check access for.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||