Jacson

de.spieleck.app.jacson.eval
Class RegExpEvaluator

java.lang.Object
  extended byde.spieleck.app.jacson.PluginBase
      extended byde.spieleck.app.jacson.eval.EvaluatorBase
          extended byde.spieleck.app.jacson.eval.RegExpEvaluator
All Implemented Interfaces:
ConfigVerify.Acceptor, JacsonChunkDrain, JacsonEvaluator, JacsonNames, JacsonRegistrable, JacsonReporting, JacsonStately

public class RegExpEvaluator
extends EvaluatorBase
implements ConfigVerify.Acceptor, JacsonNames

Regexp based Evaluator for Jacson uses pluggable handlers to actually react on the Matches.
Note: This might not be necessary any more sometimes soon, since with the latest pack of filters similar effects should be creatable without the Subhandler thing. Use with caution.

Author:
fsn

Field Summary
static java.lang.String HANDLER_NODE
           
protected  java.util.List handlers
          Handlers for matches
protected  java.lang.String label
          Output Marker
protected  long matches
          Counter for total matches
protected  org.apache.oro.text.regex.Pattern pattern
          oro-Regexp-Pattern
protected  RegExpUtil rutil
           
 
Fields inherited from interface de.spieleck.app.jacson.JacsonNames
BLOCKREPORT, JS_DEBUG_FLAG, JS_MAIN_CFG, JS_OBJ_EVAL, JS_OBJ_FILTER, JS_OBJ_LABEL, JS_OBJ_REPORT, JS_OBJ_SELECT, JS_OBJ_SOURCE, JS_PCK_EVAL, JS_PCK_FILTER, JS_PCK_REPORT, JS_PCK_SELECT, JS_PCK_SOURCE, JS_REP_BLOCK, JS_REP_CHUNK, JS_REP_EVAL, JS_REP_FILTER, JS_REP_LABEL, JS_REP_LIST, JS_REP_LOG, JS_REP_NAME, JS_REP_NUMBER, JS_REP_PROC, JS_REP_RESULT, JS_REP_SUMMARY, JS_REP_TIME, JS_REP_TSTAMP, JS_REPORT_CFG, JS_STATE_ID
 
Constructor Summary
RegExpEvaluator()
           
 
Method Summary
 boolean accept(ConfigNode cn)
           
 void init(ConfigNode node, JacsonRegistry registry)
           
 void obtainHandlers(ConfigNode node, java.util.Iterator iter, JacsonRegistry registry)
           
 void putChunk(java.lang.String chunk)
          Feed a single chunk into this filter
 void registerReport(JacsonReport jr)
           
 void summary()
          Do nothing default implementation
 
Methods inherited from class de.spieleck.app.jacson.PluginBase
getRegReport, getRegState, registerState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.spieleck.app.jacson.JacsonStately
registerState
 

Field Detail

HANDLER_NODE

public static final java.lang.String HANDLER_NODE
See Also:
Constant Field Values

pattern

protected org.apache.oro.text.regex.Pattern pattern
oro-Regexp-Pattern


handlers

protected java.util.List handlers
Handlers for matches


matches

protected long matches
Counter for total matches


label

protected java.lang.String label
Output Marker


rutil

protected RegExpUtil rutil
Constructor Detail

RegExpEvaluator

public RegExpEvaluator()
Method Detail

init

public void init(ConfigNode node,
                 JacsonRegistry registry)
          throws JacsonConfigException
Specified by:
init in interface JacsonRegistrable
Throws:
JacsonConfigException

accept

public boolean accept(ConfigNode cn)
Specified by:
accept in interface ConfigVerify.Acceptor

obtainHandlers

public void obtainHandlers(ConfigNode node,
                           java.util.Iterator iter,
                           JacsonRegistry registry)
                    throws JacsonConfigException
Throws:
JacsonConfigException

registerReport

public void registerReport(JacsonReport jr)
Specified by:
registerReport in interface JacsonReporting
Overrides:
registerReport in class PluginBase

putChunk

public void putChunk(java.lang.String chunk)
              throws JacsonException
Description copied from interface: JacsonChunkDrain
Feed a single chunk into this filter

Specified by:
putChunk in interface JacsonChunkDrain
Throws:
JacsonException

summary

public void summary()
Description copied from class: PluginBase
Do nothing default implementation

Specified by:
summary in interface JacsonReporting
Overrides:
summary in class PluginBase

Spieleck

Copyleft 2002 spieleck.de.