Jacson

de.spieleck.app.jacson.filter
Class TailPadFilter

java.lang.Object
  extended byde.spieleck.app.jacson.PluginBase
      extended byde.spieleck.app.jacson.filter.FilterBase
          extended byde.spieleck.app.jacson.filter.TailPadFilter
All Implemented Interfaces:
ConfigVerify.Acceptor, FilterNames, JacsonChunkDrain, JacsonFilter, JacsonRegistrable, JacsonReporting, JacsonStately

public class TailPadFilter
extends FilterBase
implements FilterNames, ConfigVerify.Acceptor

TailPadFilter

Description

Filter class which either adds a configurable token as last chunk or appends the token to the last chunk. This allows something like awk's end.

Parameters

Attribute Description Required
post The token to add at the end Yes
separatechunk Determines if the token is added as separated chunk or if the token is prepended to the first chunk No, default is false

Since:
0.90
Version:
$Id: TailPadFilter.java 35 2005-10-03 22:08:55Z pcs $
Author:
pcs

Field Summary
static java.lang.String POST_NODE
           
static java.lang.String SEPARATE_CHUNK_NODE
           
 
Fields inherited from class de.spieleck.app.jacson.filter.FilterBase
drain
 
Fields inherited from interface de.spieleck.app.jacson.filter.FilterNames
COUNT_NODE, INVERSE_NODE
 
Constructor Summary
TailPadFilter()
          Creates a new instance of TailPadFilter
 
Method Summary
 boolean accept(ConfigNode node)
           
 void init(ConfigNode snr, JacsonRegistry registry)
           
 void putChunk(java.lang.String ch)
          Feed a single chunk into this filter
 
Methods inherited from class de.spieleck.app.jacson.filter.FilterBase
setDrain
 
Methods inherited from class de.spieleck.app.jacson.PluginBase
getRegReport, getRegState, registerReport, registerState, summary
 
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
 
Methods inherited from interface de.spieleck.app.jacson.JacsonReporting
registerReport, summary
 

Field Detail

POST_NODE

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

SEPARATE_CHUNK_NODE

public static final java.lang.String SEPARATE_CHUNK_NODE
See Also:
Constant Field Values
Constructor Detail

TailPadFilter

public TailPadFilter()
Creates a new instance of TailPadFilter

Method Detail

init

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

putChunk

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

Specified by:
putChunk in interface JacsonChunkDrain
Throws:
JacsonException

accept

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

Spieleck

Copyleft 2002 spieleck.de.