public class RegexFilter extends JSONDataFilter
DataFilter.Abort, DataFilter.AbortException| Modifier and Type | Field and Description |
|---|---|
protected java.util.regex.Pattern[] |
_patterns |
protected java.lang.String[] |
_replaces |
protected java.lang.String[] |
_templates |
| Constructor and Description |
|---|
RegexFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
filterString(ServerSession session,
ServerChannel channel,
java.lang.String string) |
void |
init(java.lang.Object init)
The
init object must be an array of array of this form: |
filter, filterArray, filterBoolean, filterBoolean, filterCollection, filterList, filterMap, filterNumber, filterNumber, filterObject, filterStringprotected java.lang.String[] _templates
protected java.lang.String[] _replaces
protected java.util.regex.Pattern[] _patterns
public void init(java.lang.Object init)
The init object must be an array of array of this form:
[
[regex1, replacement1],
[regex2, replacement2],
...
]
If the replacement string is null, then an
AbortException is thrown if the pattern matches.
init in class JSONDataFilterprotected java.lang.Object filterString(ServerSession session, ServerChannel channel, java.lang.String string)
filterString in class JSONDataFilterCopyright © 2008–2019 The CometD Project. All rights reserved.