org.cometd.server.filter
Class RegexFilter

java.lang.Object
  extended by org.cometd.server.filter.JSONDataFilter
      extended by org.cometd.server.filter.RegexFilter
All Implemented Interfaces:
DataFilter

public class RegexFilter
extends JSONDataFilter

Author:
gregw

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cometd.server.filter.DataFilter
DataFilter.Abort
 
Field Summary
protected  Pattern[] _patterns
           
protected  String[] _replaces
           
protected  String[] _templates
           
 
Constructor Summary
RegexFilter()
           
 
Method Summary
protected  void checkPatterns()
           
protected  Object filterString(String string)
           
 void init(Object init)
          Assumes the init object is an Array of 2 element Arrays: [regex,replacement].
 
Methods inherited from class org.cometd.server.filter.JSONDataFilter
filter, filterArray, filterBoolean, filterJSON, filterJSON, filterMap, filterNumber, filterObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_templates

protected String[] _templates

_replaces

protected String[] _replaces

_patterns

protected transient Pattern[] _patterns
Constructor Detail

RegexFilter

public RegexFilter()
Method Detail

init

public void init(Object init)
Assumes the init object is an Array of 2 element Arrays: [regex,replacement]. if the regex replacement string is null, then an IllegalStateException is thrown if the pattern matches.

Overrides:
init in class JSONDataFilter

checkPatterns

protected void checkPatterns()

filterString

protected Object filterString(String string)
Overrides:
filterString in class JSONDataFilter


Copyright © 2008-2010 Dojo Foundation. All Rights Reserved.