Package org.altlinux.jabbix
Class WhitelistPredicate
- java.lang.Object
-
- org.altlinux.jabbix.WhitelistPredicate
-
- All Implemented Interfaces:
ConnectionPredicate
public class WhitelistPredicate extends java.lang.Object implements ConnectionPredicate
Implements a connection predicate using a regular expression to test the host name.- Author:
- Paul Wolneykien
- See Also:
JabbixSecurityManager
-
-
Constructor Summary
Constructors Constructor Description WhitelistPredicate(java.lang.String addressPattern)
Creates a new predicate instance from the specified pattern.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAllowed(java.lang.String host, int port)
Tests if the given host name matches the configured pattern.
-
-
-
Method Detail
-
isAllowed
public boolean isAllowed(java.lang.String host, int port)
Tests if the given host name matches the configured pattern.- Specified by:
isAllowed
in interfaceConnectionPredicate
- Parameters:
host
- the host to connect to/fromport
- the port to connect to/from- Returns:
- true if the connection is allowed, false otherwise
-
-