|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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(java.lang.String allowPattern,
java.lang.String denyPattern)
|
Method Summary | |
---|---|
boolean |
accessAllowed(java.net.InetAddress inetAddress)
Checks if the specified InetAdress has permission to access. |
boolean |
accessAllowed(java.net.Socket socket)
Checks if a (connection from a) socket has permission to access. |
boolean |
accessAllowed(java.lang.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(java.lang.String allowPattern, java.lang.String denyPattern)
Method Detail |
---|
public static IPChecker getConfiguredIPChecker()
public static void init()
public boolean accessAllowed(java.lang.String hostName)
hostName
- the name or string IP representation.
public boolean accessAllowed(java.net.Socket socket)
socket
- the Socket to check access for.
public boolean accessAllowed(java.net.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 |