public class WhitelistPredicate extends java.lang.Object implements ConnectionPredicate
JabbixSecurityManager
Constructor and Description |
---|
WhitelistPredicate(java.lang.String addressPattern)
Creates a new predicate instance from the specified pattern.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAllowed(java.lang.String host,
int port)
Tests if the given host name matches the configured pattern.
|
public WhitelistPredicate(java.lang.String addressPattern)
addressPattern
- a regular expression to the the host names withpublic boolean isAllowed(java.lang.String host, int port)
isAllowed
in interface ConnectionPredicate
host
- the host to connect to/fromport
- the port to connect to/from