public class RegexFilter extends JSONDataFilter
DataFilter.AbortException
Modifier and Type | Field and Description |
---|---|
protected Pattern[] |
_patterns |
protected String[] |
_replaces |
protected String[] |
_templates |
Constructor and Description |
---|
RegexFilter() |
Modifier and Type | Method and Description |
---|---|
protected Object |
filterString(ServerSession session,
ServerChannel channel,
String string) |
void |
init(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. |
filter, filterArray, filterBoolean, filterCollection, filterList, filterMap, filterNumber, filterObject
protected String[] _templates
protected String[] _replaces
protected Pattern[] _patterns
public void init(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 JSONDataFilter
protected Object filterString(ServerSession session, ServerChannel channel, String string)
filterString
in class JSONDataFilter
Copyright © 2008–2024 The CometD Project. All rights reserved.