Package org.cometd.server.filter
Class RegexFilter
- java.lang.Object
-
- org.cometd.server.filter.JSONDataFilter
-
- org.cometd.server.filter.RegexFilter
-
- All Implemented Interfaces:
DataFilter
public class RegexFilter extends JSONDataFilter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.cometd.server.filter.DataFilter
DataFilter.AbortException
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.regex.Pattern[]
_patterns
protected java.lang.String[]
_replaces
protected java.lang.String[]
_templates
-
Constructor Summary
Constructors Constructor Description RegexFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
filterString(ServerSession session, ServerChannel channel, java.lang.String string)
void
init(java.lang.Object init)
Theinit
object must be an array of array of this form:-
Methods inherited from class org.cometd.server.filter.JSONDataFilter
filter, filterArray, filterBoolean, filterCollection, filterList, filterMap, filterNumber, filterObject
-
-
-
-
Method Detail
-
init
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 anDataFilter.AbortException
is thrown if the pattern matches.- Overrides:
init
in classJSONDataFilter
-
filterString
protected java.lang.Object filterString(ServerSession session, ServerChannel channel, java.lang.String string)
- Overrides:
filterString
in classJSONDataFilter
-
-