public class IPChecker
extends java.lang.Object
Constructor and Description |
---|
IPChecker(java.lang.String name,
java.lang.String ipAddress,
java.lang.String port,
java.lang.String allowPattern,
java.lang.String denyPattern) |
Modifier and Type | Method and Description |
---|---|
boolean |
accessAllowed(java.net.InetAddress inetAddress,
java.net.InetAddress proxyAddress)
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,
java.lang.String proxyName)
Checks if the host with the specified name /from the specified proxy has the permission to access.
|
static IPChecker |
getConfiguredIPChecker(javax.servlet.http.HttpServletRequest request)
Returns an IPChecker which is initialized with the patterns from the configuration
|
static void |
init()
initializes the ip-checker;
|
boolean |
isPassive() |
public IPChecker(java.lang.String name, java.lang.String ipAddress, java.lang.String port, java.lang.String allowPattern, java.lang.String denyPattern)
public boolean isPassive()
public static IPChecker getConfiguredIPChecker(javax.servlet.http.HttpServletRequest request)
public static void init()
public boolean accessAllowed(java.lang.String hostName, java.lang.String proxyName)
hostName
- the name or string IP representation.proxyName
- 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, java.net.InetAddress proxyAddress)
inetAddress
- the InetAdress to check access for.proxyAddress
- the InetAdress to check access for (if a rule is defined as proxyRule)@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.