Jacson

de.spieleck.app.jacson
Class JacsonBlock

java.lang.Object
  extended byde.spieleck.app.jacson.JacsonBlock
All Implemented Interfaces:
ConfigVerify.Acceptor, JacsonChunkDrain, JacsonEvaluator, JacsonNames, JacsonRegistrable, JacsonReporting, JacsonStately
Direct Known Subclasses:
Jacson, PluginAdapterHandler, SelectionFilterFilter

public class JacsonBlock
extends java.lang.Object
implements JacsonEvaluator, JacsonNames, ConfigVerify.Acceptor

Special Evaluator to actually perform whole standard processing.

This is the major building block of Jacson.

The standard behaviour is implemented as a JacsonEvaluator itself, to allow the imbedding of blocks into other blocks.

This plugin takes the incoming chunk. Applies all filters and then passes the chunk to the underlying evaluators.

Author:
fsn

Field Summary
protected  JacsonChunkDrain chunkDispatch
          special JacsonChunkDrain to dispatch chunk to Evaluators.
protected  java.util.List evaluators
          Evaluator to actually treat the chuncks.
protected  java.util.List filters
          Filtering the chunk stream
protected  java.lang.String label
          Additional text to augment output
protected  JacsonState myState
          Encapsulate state,
 
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
JacsonBlock()
           
 
Method Summary
 boolean accept(ConfigNode node)
           
 void addEvaluator(JacsonEvaluator plug)
           
 void addFilter(JacsonFilter filter)
           
 void addReport(JacsonReport rep)
           
 void clearReports()
           
static JacsonReport createReport(ConfigNode cfg, java.lang.String reportClazz)
          Helper clazz to create an report
 void dispatchChunk(java.lang.String chunk)
          Helper also used elsewhere
protected  java.lang.String getLabel()
           
 JacsonChunkDrain getMyDrain()
           
 JacsonPrintReport getReport()
          Expose the report to the public
 void init(ConfigNode config, JacsonRegistry registry)
           
protected  void obtainEvaluators(ConfigNode config, java.util.Iterator iter, JacsonRegistry registry)
          Obtain the list of (sub-)Evaluators
protected  void obtainFilters(ConfigNode config, java.util.Iterator iter, JacsonRegistry registry)
           
protected  void obtainReports(java.util.Iterator iter, JacsonRegistry registry)
          Obtain a list of reports
 void putChunk(java.lang.String chunk)
          Feed a single chunk into this filter
static void registerReport(java.util.Iterator it, JacsonReport report)
           
 void registerReport(JacsonReport report)
           
static void registerState(java.util.Iterator it, JacsonState state)
           
 void registerState(JacsonState state)
          Give the class access to an appropriate state.
protected  void setChunkDispatch(JacsonChunkDrain d)
           
 void summary()
           
static void summary(java.util.Iterator it)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filters

protected java.util.List filters
Filtering the chunk stream


evaluators

protected java.util.List evaluators
Evaluator to actually treat the chuncks.


chunkDispatch

protected JacsonChunkDrain chunkDispatch
special JacsonChunkDrain to dispatch chunk to Evaluators.


label

protected java.lang.String label
Additional text to augment output


myState

protected JacsonState myState
Encapsulate state,

Constructor Detail

JacsonBlock

public JacsonBlock()
Method Detail

init

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

accept

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

obtainFilters

protected void obtainFilters(ConfigNode config,
                             java.util.Iterator iter,
                             JacsonRegistry registry)
                      throws JacsonConfigException
Throws:
JacsonConfigException

obtainReports

protected void obtainReports(java.util.Iterator iter,
                             JacsonRegistry registry)
                      throws JacsonConfigException
Obtain a list of reports

Throws:
JacsonConfigException

createReport

public static JacsonReport createReport(ConfigNode cfg,
                                        java.lang.String reportClazz)
                                 throws JacsonConfigException
Helper clazz to create an report

Throws:
JacsonConfigException

obtainEvaluators

protected void obtainEvaluators(ConfigNode config,
                                java.util.Iterator iter,
                                JacsonRegistry registry)
                         throws JacsonConfigException
Obtain the list of (sub-)Evaluators

Throws:
JacsonConfigException

addFilter

public void addFilter(JacsonFilter filter)

addEvaluator

public void addEvaluator(JacsonEvaluator plug)

addReport

public void addReport(JacsonReport rep)

clearReports

public void clearReports()

registerReport

public void registerReport(JacsonReport report)
Specified by:
registerReport in interface JacsonReporting

registerReport

public static void registerReport(java.util.Iterator it,
                                  JacsonReport report)

registerState

public void registerState(JacsonState state)
Description copied from interface: JacsonStately
Give the class access to an appropriate state.

Specified by:
registerState in interface JacsonStately

registerState

public static void registerState(java.util.Iterator it,
                                 JacsonState state)

getReport

public JacsonPrintReport getReport()
Expose the report to the public


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

getMyDrain

public JacsonChunkDrain getMyDrain()

setChunkDispatch

protected void setChunkDispatch(JacsonChunkDrain d)

getLabel

protected java.lang.String getLabel()

summary

public void summary()
Specified by:
summary in interface JacsonReporting

summary

public static void summary(java.util.Iterator it)

dispatchChunk

public void dispatchChunk(java.lang.String chunk)
                   throws JacsonException
Helper also used elsewhere

Throws:
JacsonException

Spieleck

Copyleft 2002 spieleck.de.