|
|||||||||
| 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 only with IPV4 adress formats.
| Constructor Summary | |
|---|---|
IPChecker(java.lang.String allowPattern,
java.lang.String denyPattern)
|
|
| Method Summary | |
|---|---|
boolean |
accessAllowed(byte[] rawIPAddress)
Determines whether access from the rawIPAddress is allowed. |
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 initializes with the patterns from the configuration |
| 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 boolean accessAllowed(java.lang.String hostName)
hostName - the name or string IP representation.
public boolean accessAllowed(java.net.InetAddress inetAddress)
inetAddress - the InetAdress to check access for.
public boolean accessAllowed(java.net.Socket socket)
socket - the Socket to check access for.
public boolean accessAllowed(byte[] rawIPAddress)
rawIPAddress - the raw IP Adress to check access for. See InetAdress.getAddress().
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||