public class RegexURLFilter extends RegexURLFilterBase
Java Regex implementation
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
URLFILTER_REGEX_FILE |
static java.lang.String |
URLFILTER_REGEX_RULES |
X_POINT_ID
Constructor and Description |
---|
RegexURLFilter() |
RegexURLFilter(java.lang.String filename) |
Modifier and Type | Method and Description |
---|---|
protected RegexRule |
createRule(boolean sign,
java.lang.String regex)
Creates a new
RegexRule . |
protected java.io.Reader |
getRulesReader(Configuration conf)
Rules specified as a config property will override rules specified as a
config file.
|
static void |
main(java.lang.String[] args) |
filter, getConf, main, setConf
public static final java.lang.String URLFILTER_REGEX_FILE
public static final java.lang.String URLFILTER_REGEX_RULES
public RegexURLFilter()
public RegexURLFilter(java.lang.String filename) throws java.io.IOException, java.util.regex.PatternSyntaxException
java.io.IOException
java.util.regex.PatternSyntaxException
protected java.io.Reader getRulesReader(Configuration conf) throws java.io.IOException
getRulesReader
in class RegexURLFilterBase
conf
- is the current configuration.java.io.IOException
protected RegexRule createRule(boolean sign, java.lang.String regex)
RegexURLFilterBase
RegexRule
.createRule
in class RegexURLFilterBase
sign
- of the regular expression. A true
value means that
any URL matching this rule must be included, whereas a
false
value means that any URL matching this rule
must be excluded.regex
- is the regular expression associated to this rule.public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
Copyright © 2019 The Apache Software Foundation